public interface Relation extends OntologyEntity
inverse must be based directly on a primitive relation (symmetric<:inverse) == (symmetric<:primitive(inverse)) primitive / | / | inverse | \ | \--U--| symmetric
Modifier and Type | Interface and Description |
---|---|
static class |
Relation.Property |
Modifier and Type | Method and Description |
---|---|
boolean |
add(Type domain,
Type range)
Puts the domain/range pair into the relation.
|
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 |
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.
|
boolean |
relatedTo(Type domain,
Type range)
Determines if an element is related to another element.
|
boolean |
remove(Type domain,
Type range)
Removes domain/range pair from the relation.
|
void |
setMark(boolean mark)
Convenience method to set or clear a mark in the relation when iterating relations.
|
boolean |
setVisible(boolean set)
Some relations are not declared, but are created in some implementations in the process of creating other relations.
|
getName, getOntology, toString
compareTo
boolean relatedTo(Type domain, Type range)
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 relationdomain
is related to range
Set<Type> relatedTo(Type domain)
domain
has a role of
type range
.domain
- the thing that is a the "source" of the relationboolean add(Type domain, Type range) throws IllegalOperationException
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
boolean remove(Type domain, Type range) throws IllegalOperationException
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
boolean isAssignable()
boolean isMark()
setMark(boolean)
.void setMark(boolean mark)
mark
- value to set the mark to.boolean hasProperty(Relation.Property property)
property
- boolean isVisible()
setVisible(boolean)
boolean setVisible(boolean set)
OntologyEntity.toString()
). Use setVisible() to set the visibility attribute as read by isVisible()
.set
- set to true to make this relation visible, false to make it invisible.