public class InverseRelation extends BasedRelation
Relation.Property
assignable, base, domConstraint, ranConstraint
name, visible
Constructor and Description |
---|
InverseRelation(String name,
Ontology ontology,
ConcreteRelation base,
boolean assignable,
Constraint domConstraint,
Constraint ranConstraint,
Relation owner) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(Type subject,
Type object)
Puts the domain/range pair into the relation.
|
boolean |
hasProperty(Relation.Property property) |
Set<Type> |
relatedTo(Type domain,
ConcreteRelation topOfStack) |
protected Maplet |
relatedTo(Type domain,
Type range,
ConcreteRelation topOfStack) |
boolean |
remove(Type subject,
Type object)
Removes domain/range pair from the relation.
|
String |
toStringOptions() |
getBaseName, getUses, isAssignable, isBasedOn, setVisible, toString, toStringComment
compareTo, getName, getOntology, getRelativeName, isMark, isVisible, relatedTo, relatedTo, relatedToX, setMark, setName
public InverseRelation(String name, Ontology ontology, ConcreteRelation base, boolean assignable, Constraint domConstraint, Constraint ranConstraint, Relation owner) throws IllegalOperationException
name
- owner
- TODOIllegalOperationException
protected Maplet relatedTo(Type domain, Type range, ConcreteRelation topOfStack)
relatedTo
in class ConcreteRelation
public Set<Type> relatedTo(Type domain, ConcreteRelation topOfStack)
relatedTo
in class ConcreteRelation
public boolean add(Type subject, Type object) throws IllegalOperationException
Relation
domain
has a role of
type range
.add
in interface Relation
add
in class BasedRelation
subject
- the thing that is a the "source" of the relationobject
- the thing that is the "destination" of the relationIllegalOperationException
public boolean remove(Type subject, Type object) throws IllegalOperationException
Relation
domain
has a role of
type range
.remove
in interface Relation
remove
in class BasedRelation
subject
- the thing that is a the "source" of the relationobject
- the thing that is the "destination" of the relationIllegalOperationException
public boolean hasProperty(Relation.Property property)
hasProperty
in interface Relation
hasProperty
in class ConcreteRelation
public String toStringOptions()
toStringOptions
in class ConcreteRelation