public abstract class ConcreteRelation extends Object implements Relation
Relation.Property
Modifier and Type | Field and Description |
---|---|
private boolean |
mark |
protected Name |
name |
(package private) boolean |
visible |
Constructor and Description |
---|
ConcreteRelation(String name,
Ontology ontology) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(OntologyEntity o) |
String |
getName() |
Ontology |
getOntology() |
String |
getRelativeName(Ontology ont) |
abstract ConcreteRelation |
getUses() |
boolean |
hasProperty(Relation.Property property) |
abstract boolean |
isBasedOn(Relation other) |
boolean |
isMark()
Convenience method to check if a method is marked.
|
boolean |
isVisible() |
Set<Type> |
relatedTo(Type domain)
Returns all the types that this domain is related to.
|
abstract Set<Type> |
relatedTo(Type domain,
ConcreteRelation topOfStack) |
boolean |
relatedTo(Type domain,
Type range)
Determines if domain is related to range through this
Relation.
|
protected abstract Maplet |
relatedTo(Type domain,
Type range,
ConcreteRelation topOfStack) |
Maplet |
relatedToX(Type domain,
Type range)
Determines if domain is related to range through this
Relation.
|
void |
setMark(boolean mark)
Convenience method to set or clear a mark in the relation when iterating relations.
|
void |
setName(String name) |
boolean |
setVisible(boolean set)
Some relations are not declared, but are created in some implementations in the process of creating other relations.
|
abstract String |
toStringComment(Ontology relativeToOntology)
A comment string appropriate for the relation (not inclding the prefix ";").
|
String |
toStringOptions() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
add, isAssignable, remove
toString
protected Name name
private boolean mark
boolean visible
ConcreteRelation(String name, Ontology ontology) throws IllegalOperationException
IllegalOperationException
public int compareTo(OntologyEntity o)
compareTo
in interface Comparable<OntologyEntity>
public String getName()
getName
in interface OntologyEntity
public Ontology getOntology()
getOntology
in interface OntologyEntity
public void setName(String name) throws IllegalOperationException
IllegalOperationException
public abstract boolean isBasedOn(Relation other)
public final boolean relatedTo(Type domain, Type range)
relatedToX(Type, Type)
and returning
FALSE if it returns null, and TRUE otherwise.relatedTo
in interface Relation
domain
- range
- Relation.relatedTo(casa.ontology.Type, casa.ontology.Type)
public final Maplet relatedToX(Type domain, Type range)
relatedTo(Type, Type)
and returning
FALSE if it returns null, and TRUE otherwise.domain
- range
- protected abstract Maplet relatedTo(Type domain, Type range, ConcreteRelation topOfStack)
public final Set<Type> relatedTo(Type domain)
Relation
domain
has a role of
type range
.public abstract Set<Type> relatedTo(Type domain, ConcreteRelation topOfStack)
public boolean isMark()
Relation
Relation.setMark(boolean)
.public void setMark(boolean mark)
Relation
public boolean hasProperty(Relation.Property property)
hasProperty
in interface Relation
public boolean isVisible()
isVisible
in interface Relation
Relation.setVisible(boolean)
public boolean setVisible(boolean set)
Relation
OntologyEntity.toString()
). Use setVisible() to set the visibility attribute as read by Relation.isVisible()
.setVisible
in interface Relation
set
- public String toStringOptions()
public abstract ConcreteRelation getUses()
public abstract String toStringComment(Ontology relativeToOntology)
name(class-name), name(class-name)...describing the base and ordered decorators for this relation.
relativeToOntology
- TODO