summaryrefslogtreecommitdiffstats
path: root/ontogen.template
blob: c1f94d0a3c101ef7f50a3a11a5d870cde3aa18fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<?xml version="1.0" encoding="UTF-8"?>
<!--!
  Copyright 2013 Red Hat, Inc.
  Author: Jan Pokorný <jpokorny at redhat dot com>
  Licensed under LGPL v2.1 (the same as original ns-schema.xsl)
 -->
<rdf:RDF
   xml:base="${Ontology.base_uri_full}"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:owl="http://www.w3.org/2002/07/owl#"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
   xmlns:py="http://genshi.edgewall.org/"
   xmlns:vs="http://www.w3.org/2003/06/sw-vocab-status/ns#"
   py:attrs="namespaces">

  <!--
    ONTOLOGY
   -->

  <owl:Ontology rdf:about="">
    <owl:imports rdf:resource="http://purl.org/dc/elements/1.1/"/>
    <owl:versionInfo>${Ontology.version}</owl:versionInfo><!--!
                              --><py:if test="Ontology.priorVersion">
    <owl:priorVersion>${Ontology.priorVersion.base_uri_full}</owl:priorVersion><!--!
                              --></py:if><py:if test="Ontology.label">
    <rdfs:label>${Ontology.label}</rdfs:label><!--!
                              --></py:if><py:if test="Ontology.comment">
    <rdfs:comment>
${Ontology.comment}
    </rdfs:comment><!--!
                              --></py:if><py:if test="Ontology.creator">
    <dc:creator>
      ${Ontology.creator}
    </dc:creator><!--!
                              --></py:if>
    <dc:issued>${Ontology.issued}</dc:issued><py:if test="Ontology.modified">
    <dc:modified>${Ontology.modified}</dc:modified></py:if>
  </owl:Ontology>

  <!--
    CLASSES
   -->
<!--!                         --><py:for each="Class in Ontology.classes">
  <rdf:Class rdf:about="${Class.id}"><!--!
                              --><py:if test="Class.label">
    <rdfs:label>${Class.label}</rdfs:label><!--!
                              --></py:if><py:if test="Class.comment">
    <rdfs:comment>
${Class.comment}
    </rdfs:comment><!--!
                              --></py:if><py:if test="Class.subClassOf">
    <rdfs:subClassOf rdf:resource="${Class.subClassOf}"/><!--!
                              --></py:if><py:if test="Class.status">
    <vs:term-status>${Class.status}</vs:term-status><!--!
                              --></py:if>
  </rdf:Class>
<!--!
                              --></py:for>
  <!--
    PROPERTIES
   -->
<!--!                         --><py:for each="Property in Ontology.properties">
  <rdf:Property rdf:about="${Property.id}"><!--!
                              --><py:if test="Property.label">
    <rdfs:label>${Property.label}</rdfs:label><!--!
                              --></py:if><py:if test="Property.comment">
    <rdfs:comment>
${Property.comment}
    </rdfs:comment><!--!
                              --></py:if><py:if test="Property.subPropertyOf">
    <rdfs:subPropertyOf rdf:resource="${Property.subPropertyOf}"/><!--!
                              --></py:if><py:if test="Property.domain">
    <rdfs:domain rdf:resource="${Property.domain}"/><!--!
                              --></py:if><py:if test="Property.range">
    <rdfs:range rdf:resource="${Property.range}"/><!--!
                              --></py:if><py:if test="Property.status">
    <vs:term-status>${Property.status}</vs:term-status><!--!
                              --></py:if>
  </rdf:Property>
<!--!                         
                              --></py:for>
  <!--
    EXAMPLES
   -->
<!--!                        --><py:for each="Example in Ontology.examples">
  <ex:Example xmlns:ex="http://purl.org/net/ns/ex#"><!--!
                              --><py:if test="Example.comment">
    <rdfs:comment>
${Example.comment}
    </rdfs:comment><!--!
                              --></py:if><py:if test="Example.pfx">
    <ex:pfx>${Example.pfx}</ex:pfx><!--!
                              --></py:if><py:if test="Example.code">
    <ex:code><![CDATA[
${Example.code}
]]></ex:code><!--!
                              --></py:if><py:if test="Example.image">
    <ex:image rdf:resource="${Example.image}"/><!--!
                              --></py:if>
    <ex:exampleOf rdf:resource=""/>
  </ex:Example>
  </py:for>
<!-- vim: set et noai sts=2 sw=2 ft=xml: -->
</rdf:RDF>