public class PrimitiveRelation extends ConcreteRelation
Relation.Property
Modifier and Type | Field and Description |
---|---|
protected Constraint |
domConstraint |
protected Constraint |
ranConstraint |
name, visible
Constructor and Description |
---|
PrimitiveRelation(String name,
Ontology ontology) |
PrimitiveRelation(String name,
Ontology ontology,
Constraint domainConstraint,
Constraint rangeConstraint) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(Type domain,
Type range)
Puts the domain/range pair into the relation.
|
ConcreteRelation |
getUses() |
boolean |
hasProperty(Relation.Property property) |
boolean |
isAssignable()
Some relations are based on other relations, and only base relations can have
maplets declared as members.
|
boolean |
isBasedOn(Relation other) |
Set<Type> |
relatedTo(Type domain,
ConcreteRelation topOfStack) |
protected Maplet |
relatedTo(Type domain,
Type range,
ConcreteRelation topOfStack) |
boolean |
remove(Type domain,
Type range)
Removes domain/range pair from the relation.
|
boolean |
setVisible(boolean set)
Some relations are not declared, but are created in some implementations in the process of creating other relations.
|
String |
toString() |
String |
toStringComment(Ontology relativeToOntology)
A comment string appropriate for the relation (not inclding the prefix ";").
|
compareTo, getName, getOntology, getRelativeName, isMark, isVisible, relatedTo, relatedTo, relatedToX, setMark, setName, toStringOptions
protected Constraint domConstraint
protected Constraint ranConstraint
PrimitiveRelation(String name, Ontology ontology) throws IllegalOperationException
IllegalOperationException
PrimitiveRelation(String name, Ontology ontology, Constraint domainConstraint, Constraint rangeConstraint) throws IllegalOperationException
IllegalOperationException
protected Maplet relatedTo(Type domain, Type range, ConcreteRelation topOfStack)
relatedTo
in class ConcreteRelation
public boolean add(Type domain, Type range) throws IllegalOperationException
Relation
domain
has a role of
type range
.domain
- the thing that is a the "source" of the relationrange
- the thing that is the "destination" of the relationIllegalOperationException
public boolean remove(Type domain, Type range) throws IllegalOperationException
Relation
domain
has a role of
type range
.domain
- the thing that is a the "source" of the relationrange
- the thing that is the "destination" of the relationIllegalOperationException
public Set<Type> relatedTo(Type domain, ConcreteRelation topOfStack)
relatedTo
in class ConcreteRelation
public boolean isAssignable()
Relation
public boolean hasProperty(Relation.Property property)
hasProperty
in interface Relation
hasProperty
in class ConcreteRelation
public boolean setVisible(boolean set)
Relation
OntologyEntity.toString()
). Use setVisible() to set the visibility attribute as read by Relation.isVisible()
.setVisible
in interface Relation
setVisible
in class ConcreteRelation
set
- public String toString()
toString
in interface OntologyEntity
toString
in class Object
public boolean isBasedOn(Relation other)
isBasedOn
in class ConcreteRelation
public ConcreteRelation getUses()
getUses
in class ConcreteRelation
ConcreteRelation.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 ConcreteRelation
relativeToOntology
- TODO