Sha256: 7aa6bd275b6017832eb71c25c9c6f98d216983dc5ba02ad87593985cfff40548
Contents?: true
Size: 1.04 KB
Versions: 6
Compression:
Stored size: 1.04 KB
Contents
module PublishMyData class Ontology include Tripod::Resource include PublishMyData::ResourceModule rdf_type RDF::OWL.Ontology field :label, RDF::RDFS.label def ontology_classes Resource.find_by_sparql(" SELECT DISTINCT ?uri ?graph WHERE { GRAPH ?graph { { ?uri <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <#{self.uri}> . ?uri a <http://www.w3.org/2002/07/owl#Class> . } UNION { ?uri <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <#{self.uri}> . ?uri a <http://www.w3.org/2000/01/rdf-schema#Class> } } }" ) end def ontology_properties Resource.find_by_sparql(" SELECT DISTINCT ?uri ?graph WHERE { GRAPH ?graph { ?uri <http://www.w3.org/2000/01/rdf-schema#isDefinedBy> <#{self.uri}> . ?uri a <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> . } }" ) end end end
Version data entries
6 entries across 6 versions & 1 rubygems