public interface ComparableOntology extends Ontology, java.lang.Comparable, Changeable
ComparableTerm,
ComparableTripleOntology.Impl| Modifier and Type | Field and Description |
|---|---|
static ChangeType |
DESCRIPTION |
static ChangeType |
TERM |
static ChangeType |
TRIPLE |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getDescription()
Return a human-readable description of this ontology.
|
ComparableTerm |
getOrCreateTerm(java.lang.String name)
Looks for a term with the given name and returns it.
|
ComparableTriple |
getOrCreateTriple(Term subject,
Term object,
Term predicate)
Looks for a triple with the given subject object and predicate and returns it.
|
ComparableTerm |
getOrImportTerm(Term term)
Looks for a term with the same name as the given term and returns it.
|
java.util.Set |
getTermSet()
Returns the set of terms in this ontology.
|
java.util.Set |
getTripleSet()
Returns the set of triples in this ontology.
|
void |
setDescription(java.lang.String description)
Sets a human-readable description of this ontology.
|
void |
setTermSet(java.util.Set terms)
Clears out all the terms and populates the ontology with the contents
of the set passed.
|
void |
setTripleSet(java.util.Set triples)
Clears out all the triples and populates the ontology with the contents
of the set passed.
|
containsTerm, containsTriple, createTerm, createTerm, createTerm, createTriple, createVariable, deleteTerm, getName, getOps, getTerm, getTerms, getTriples, importTerm, setNameaddChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListenerstatic final ChangeType TERM
static final ChangeType TRIPLE
static final ChangeType DESCRIPTION
void setDescription(java.lang.String description)
throws ChangeVetoException
setDescription in interface Ontologydescription - the description.ChangeVetoException - in case of problems.java.lang.String getDescription()
getDescription in interface Ontologyvoid setTermSet(java.util.Set terms)
throws ChangeVetoException
terms - a set of Term objects this ontology should have.ChangeVetoException - if any of them are unacceptable.ComparableTermjava.util.Set getTermSet()
ComparableTermvoid setTripleSet(java.util.Set triples)
throws ChangeVetoException
triples - the set of ComparableTriple objects this ontology should have.ChangeVetoException - if any of them are unacceptable.ComparableTriplejava.util.Set getTripleSet()
ComparableTerm getOrCreateTerm(java.lang.String name)
name - the name of the term to look for.ComparableTriple getOrCreateTriple(Term subject, Term object, Term predicate)
subject - the subject of the triple eg appleobject - the object of the triple eg fruitpredicate - the relationship of the triple eg is_aComparableTerm getOrImportTerm(Term term)
term - the term to look for.