Module: RDF::Reasoner::OWL

Defined in:
vendor/bundler/ruby/2.4.0/bundler/gems/rdf-reasoner-17c965b5c3d4/lib/rdf/reasoner/owl.rb

Overview

Rules for generating OWL entailment triples

Extends RDF::Vocabulary::Term and RDF::Statement with specific entailment capabilities

Instance Method Summary collapse

Instance Method Details

#equivalentClassArray<RDF::Vocabulary::Term>

EquivalentClass of this term, also populates reverse equivalents.

When first called, this initializes a cache of reverse terms to terms where the the reverse term is listed as an equivalent of the original term.

It returns the list of terms which are equivalent to this term however defined.



108
109
110
111
# File 'vendor/bundler/ruby/2.4.0/bundler/gems/rdf-reasoner-17c965b5c3d4/lib/rdf/reasoner/owl.rb', line 108

def equivalentClass
  raise RDF::Reasoner::Error, "#{self} Can't entail equivalentClass" unless class?
  Array(self.attributes[:owl:equivalentClass"]).map {|t| RDF::Vocabulary.expand_pname(t)}
end

#equivalentPropertyArray<RDF::Vocabulary::Term>

EquivalentProperty of this term, also populates reverse equivalents.

When first called, this initializes a cache of reverse terms to terms where the the reverse term is listed as an equivalent of the original term.

It returns the list of terms which are equivalent to this term however defined.



120
121
122
123
# File 'vendor/bundler/ruby/2.4.0/bundler/gems/rdf-reasoner-17c965b5c3d4/lib/rdf/reasoner/owl.rb', line 120

def equivalentProperty
  raise RDF::Reasoner::Error, "#{self} Can't entail equivalentProperty" unless property?
  Array(self.attributes[:owl:equivalentProperty"]).map {|t| RDF::Vocabulary.expand_pname(t)}
end