org.dllearner.core.owl
Class KB
java.lang.Object
org.dllearner.core.owl.KB
- All Implemented Interfaces:
- Serializable, KBElement
public class KB
- extends Object
- implements KBElement
- See Also:
- Serialized Form
|
Method Summary |
void |
accept(KBElementVisitor visitor)
|
void |
addABoxAxiom(AssertionalAxiom axiom)
|
void |
addAxiom(Axiom axiom)
Convenience method, which adds an axiom to ABox, RBox, or
TBox depending on whether it is an assertional, role, or
terminological axiom. |
void |
addKB(KB kb)
Add another knowledge base to this one. |
void |
addRBoxAxiom(PropertyAxiom axiom)
|
void |
addTBoxAxiom(TerminologicalAxiom axiom)
|
void |
export(File file,
OntologyFormat format)
|
Set<NamedClass> |
findAllAtomicConcepts()
|
Set<ObjectProperty> |
findAllAtomicRoles()
|
SortedSet<Individual> |
findAllIndividuals()
|
Set<String> |
findAllRoleNames(Description concept)
|
Set<Individual> |
findRelatedIndividuals(Individual individual)
|
Set<Individual> |
findRelatedIndividuals(Individual individual,
TreeSet<Individual> searchedIndividuals)
|
Set<AssertionalAxiom> |
getAbox()
|
Set<Axiom> |
getAxioms()
Returns all axioms in the ontology. |
int |
getLength()
Gets the length of this knowledge base element. |
int |
getNumberOfAxioms()
|
Set<PropertyAxiom> |
getRbox()
|
Set<TerminologicalAxiom> |
getTbox()
|
String |
toKBSyntaxString(String baseURI,
Map<String,String> prefixes)
|
String |
toManchesterSyntaxString(String baseURI,
Map<String,String> prefixes)
|
String |
toString(String baseURI,
Map<String,String> prefixes)
|
KB
public KB()
findAllIndividuals
public SortedSet<Individual> findAllIndividuals()
findAllAtomicRoles
public Set<ObjectProperty> findAllAtomicRoles()
findAllRoleNames
public Set<String> findAllRoleNames(Description concept)
findAllAtomicConcepts
public Set<NamedClass> findAllAtomicConcepts()
getAbox
public Set<AssertionalAxiom> getAbox()
getRbox
public Set<PropertyAxiom> getRbox()
getTbox
public Set<TerminologicalAxiom> getTbox()
addAxiom
public void addAxiom(Axiom axiom)
- Convenience method, which adds an axiom to ABox, RBox, or
TBox depending on whether it is an assertional, role, or
terminological axiom.
- Parameters:
axiom - Axiom to add.
addABoxAxiom
public void addABoxAxiom(AssertionalAxiom axiom)
addTBoxAxiom
public void addTBoxAxiom(TerminologicalAxiom axiom)
addRBoxAxiom
public void addRBoxAxiom(PropertyAxiom axiom)
addKB
public void addKB(KB kb)
- Add another knowledge base to this one.
- Parameters:
kb - The knowledge base to add.
getLength
public int getLength()
- Description copied from interface:
KBElement
- Gets the length of this knowledge base element. For instance,
A AND B should have length 3 (as three constructs are involved).
There are different ways to define the length of an axiom,
class description etc., but this method provides a straightforward
definition of it.
- Specified by:
getLength in interface KBElement
- Returns:
- The syntactic length of the KB element, defined as the
number of syntactic constructs not including brackets.
toString
public String toString(String baseURI,
Map<String,String> prefixes)
- Specified by:
toString in interface KBElement
toKBSyntaxString
public String toKBSyntaxString(String baseURI,
Map<String,String> prefixes)
- Specified by:
toKBSyntaxString in interface KBElement
findRelatedIndividuals
public Set<Individual> findRelatedIndividuals(Individual individual)
findRelatedIndividuals
public Set<Individual> findRelatedIndividuals(Individual individual,
TreeSet<Individual> searchedIndividuals)
getNumberOfAxioms
public int getNumberOfAxioms()
accept
public void accept(KBElementVisitor visitor)
- Specified by:
accept in interface KBElement
getAxioms
public Set<Axiom> getAxioms()
- Returns all axioms in the ontology. Note that calling this
method is not efficient for large knowledge bases, since
internally all axioms are separated into ABox, RBox, and
TBox, which means that a union of these sets is computed
and returned here.
- Returns:
- All axioms in the ontology.
export
public void export(File file,
OntologyFormat format)
toManchesterSyntaxString
public String toManchesterSyntaxString(String baseURI,
Map<String,String> prefixes)
- Specified by:
toManchesterSyntaxString in interface KBElement
DL-Learner is licenced under the terms of the GNU General Public License.
Copyright © 2007-2011 Jens Lehmann