Sha256: 89975ffdcaa02975f63852070f50429ccb9e57070b032ceced155af04fd108bc
Contents?: true
Size: 1.06 KB
Versions: 19
Compression:
Stored size: 1.06 KB
Contents
module PublishMyData class Ontology include Tripod::Resource include PublishMyData::Concerns::Models::Resource 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
19 entries across 19 versions & 1 rubygems