75 self.visit_entityschema(eschema, skiprels) |
75 self.visit_entityschema(eschema, skiprels) |
76 self.w(u'<!-- property definition -->') |
76 self.w(u'<!-- property definition -->') |
77 self.visit_property_schema(eschema, skiprels) |
77 self.visit_property_schema(eschema, skiprels) |
78 self.w(u'<!-- datatype property -->') |
78 self.w(u'<!-- datatype property -->') |
79 self.visit_property_object_schema(eschema) |
79 self.visit_property_object_schema(eschema) |
80 |
80 |
81 def visit_entityschema(self, eschema, skiprels=()): |
81 def visit_entityschema(self, eschema, skiprels=()): |
82 """get a layout for an entity OWL schema""" |
82 """get a layout for an entity OWL schema""" |
83 self.w(u'<owl:Class rdf:ID="%s"><rdfs:subClassOf rdf:resource="http://www.w3.org/2002/07/owl#Thing"/>' |
83 self.w(u'<owl:Class rdf:ID="%s">'% eschema) |
84 % eschema) |
|
85 self.w(u'<!-- relations -->') |
84 self.w(u'<!-- relations -->') |
86 for rschema, targetschemas, role in eschema.relation_definitions(): |
85 for rschema, targetschemas, role in eschema.relation_definitions(): |
87 if rschema.type in skiprels: |
86 if rschema.type in skiprels: |
88 continue |
87 continue |
89 if not (rschema.has_local_role('read') or rschema.has_perm(self.req, 'read')): |
88 if not (rschema.has_local_role('read') or rschema.has_perm(self.req, 'read')): |