public class UsesRelation extends BasedRelation
Relation.Property
Modifier and Type | Field and Description |
---|---|
(package private) ConcreteRelation |
uses |
assignable, base, domConstraint, ranConstraint
name, visible
Constructor and Description |
---|
UsesRelation(String name,
Ontology ontology,
ConcreteRelation base,
ConcreteRelation uses,
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.
|
ConcreteRelation |
getUses() |
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 |
toStringComment(Ontology relativeToOntology)
A comment string appropriate for the relation (not inclding the prefix ";").
|
String |
toStringOptions() |
getBaseName, isAssignable, isBasedOn, setVisible, toString
compareTo, getName, getOntology, getRelativeName, isMark, isVisible, relatedTo, relatedTo, relatedToX, setMark, setName
ConcreteRelation uses
public UsesRelation(String name, Ontology ontology, ConcreteRelation base, ConcreteRelation uses, 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
public ConcreteRelation getUses()
getUses
in class BasedRelation
BasedRelation.getUses()
public String toStringComment(Ontology relativeToOntology)
ConcreteRelation
name(class-name), name(class-name)...describing the base and ordered decorators for this relation.
toStringComment
in class BasedRelation
relativeToOntology
- TODO