Skip to content.
File dependencies are another example of the usefulness of definitions. For example, Analyze image files have two separate parts- an image header file, and an image data file. These two have the same path, except with file extension "img" for the data file, and "hdr" for the header file. To describe this, we write
  <rdfs:Class rdf:ID="AnalyzeImageHeaderFile" extension="hdr">
    <rdfs:SubClassOf rdf:resource="File" />
    <rdfs:label><![CDATA[AnalyzeImageHeaderFile]]></rdfs:label>
    <rdfs:comment />
  </rdfs:Class>
  <rdfs:Class rdf:ID="AnalyzeImageDataFile" extension="img">
    <rdfs:SubClassOf rdf:resource="File" />
    <rdfs:label><![CDATA[AnalyzeImageDataFile]]></rdfs:label>
    <rdfs:comment />
  </rdfs:Class>
  <rdfs:Class rdf:ID="AnalyzeImageFile">
    <rdfs:SubClassOf rdf:resource="File" />
    <HasPart rdf:resource="AnalyzeImageHeaderFile">
      <replace type="extension"/>
    </HasPart>
    <HasPart rdf:resource="AnalyzeImageDataFile">
      <replace type="extension"/>
    </HasPart>
    <rdfs:label><![CDATA[AnalyzeImageFile]]></rdfs:label>
    <rdfs:comment />
  </rdfs:Class>

With this definition, an user can specify an AnalyzeImageFile, which the application will know that both files are included. Users can also specify AnalyzeImageDataFile or AnalyzeImageHeaderFile individually, which the application will know that it is just that file with the particular file extension.