![]() | Programming Assignment 1 (PA1) |
ex:Person rdfs:subClassOf ex:Animal.
ex:Animal rdfs:subClassOf ex:LivingThing.
ex:Plant rdfs:subClassOf ex:LivingThing.
ex:LivingThing rdfs:subClassOf ex:SpatialThing.
ex:Herbivore rdfs:subClassOf ex:Animal.
ex:eats rdf:type rdf:Property;
rdfs:domain ex:Animal.
ex:eatsOnlyPlants rdf:type rdf:Property;
rdfs:subPropertyOf ex:eats;
rdfs:domain ex:Herbivore;
rdfs:range ex:Plants.
The resulting XHTML should contain two nested lists, one for the
classes and one for the properties. They might look like (this is
merely an example, not a template):
<h2>Classes</h2> <ul> No way <li>ex:SpatialThing <ul> <li>ex:LivingThing <ul>...</ul> </li> </ul> <li> </ul> <h2>Properties</h2> <ul> <li>ex:eats <ul> <li>ex:eatsOnlyPlants</li> ....
rdf:type triples for that URI,
whether explicit or implicit, and no others.
rdf:type as their
property.python rdfs2xhtml.py sourceFile
destFile. The sample
script shows how to do this.python infertypes.py rdfFile
destFile, python infertypes.py -s schemaFile
rdfFile destFile and python infertypes.py
--schema schemaFile rdfFile destFile should work.rdfs2xhtml.py and infertypes.py
respectively. Hence, my programs in fulfillment of this
assignment would be bjp-rdfs2xhtml.py and
bjp-infertypes.py.yourintials-rdf2xhtml-cycles.py.4 of 4 |
