Class: EasyData::RDF::OWL

Inherits:
Namespaces show all
Defined in:
lib/data_models/namespaces/owl.rb

Constant Summary collapse

@@uri =
"http://www.w3.org/2002/07/owl#"
@@properties =
{"allValuesFrom" => "",
"annotatedProperty" => "",
"annotatedSource" => "",
"annotatedTarget" => "",
"assertionProperty" => "",
"backwardCompatibleWith" => "",
"bottomDataProperty" => "",
"bottomObjectProperty" => "",
"cardinality" => "",
"complementOf" => "",
"datatypeComplementOf" => "",
"deprecated" => "",
"differentFrom" => "",
"disjointUnionOf" => "",
"disjointWith" => "",
"distinctMembers" => "",
"equivalentClass" => "",
"equivalentProperty" => "",
"hasKey" => "",
"hasSelf" => "",
"hasValue" => "",
"imports" => "",
"incompatibleWith" => "",
"intersectionOf" => "",
"inverseOf" => "",
"maxCardinality" => "",
"maxQualifiedCardinality" => "",
"members" => "",
"minCardinality" => "",
"minQualifiedCardinality" => "",
"onClass" => "",
"onDataRange" => "",
"onDatatype" => "",
"onProperties" => "",
"onProperty" => "",
"oneOf" => "",
"priorVersion" => "",
"propertyChainAxiom" => "",
"propertyDisjointWith" => "",
"qualifiedCardinality" => "",
"sameAs" => "",
"someValuesFrom" => "",
"sourceIndividual" => "",
"targetIndividual" => "",
"targetValue" => "",
"topDataProperty" => "",
"topObjectProperty" => "",
"unionOf" => "",
"versionIRI" => "",
"versionInfo" => "",
"withRestrictions" => ""
}
@@classes =
{"AllDifferent" => "",
             "AllDisjointClasses" => "",
             "AllDisjointProperties" => "",
             "Annotation" => "",
             "AnnotationProperty" => "",
             "AsymmetricProperty" => "",
             "Axiom" => "",
             "Class" => "",
             "DataRange" => "",
             "DatatypeProperty" => "",
             "DeprecatedClass" => "",
             "DeprecatedProperty" => "",
             "FunctionalProperty" => "",
             "InverseFunctionalProperty" => "",
             "IrreflexiveProperty" => "",
             "NamedIndividual" => "",
             "NegativePropertyAssertion" => "",
             "Nothing" => "",
             "ObjectProperty" => "",
             "Ontology" => "",
             "OntologyProperty" => "",
             "ReflexiveProperty" => "",
             "Restriction" => "",
             "SymmetricProperty" => "",
             "Thing" => "",
             "TransitiveProperty" => ""
}

Class Method Summary collapse

Methods inherited from Namespaces

list, list_form

Class Method Details

.classesObject

Return a list of Namespace’s classes



111
112
113
# File 'lib/data_models/namespaces/owl.rb', line 111

def self.classes
   @@classes.keys
end

.classes_formObject



115
116
117
118
119
120
121
# File 'lib/data_models/namespaces/owl.rb', line 115

def self.classes_form 
  list = {}
  @@classes.keys.each do |c|
    list[c] = c
  end
  list
end

.get_uriObject

Return Namespace URI



88
89
90
# File 'lib/data_models/namespaces/owl.rb', line 88

def self.get_uri
  @@uri
end

.propertiesObject

Return a list of Namespace’s properties



98
99
100
# File 'lib/data_models/namespaces/owl.rb', line 98

def self.properties
   @@properties.keys
end

.properties_formObject



102
103
104
105
106
107
108
# File 'lib/data_models/namespaces/owl.rb', line 102

def self.properties_form 
  list = {}
  @@properties.keys.each do |property|
    list[property] = property
  end
  list
end

.to_s(property, uri, value) ⇒ Object

Return tag to rdf doc



93
94
95
# File 'lib/data_models/namespaces/owl.rb', line 93

def self.to_s(property,uri,value)
   @@properties[property].gsub("%uri%",uri).gsub('%value%',value)
end