|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--notio.Type | +--notio.RelationType
The relation type class. This class encapsulates all available information about a relation type. The type can be defined by a label and/or a type definition or valence. Relation types provide the type information for both the relations and actors.
Constructor Summary | |
RelationType()
Constructs a RelationType with no label or type definition. |
|
RelationType(RelationTypeDefinition newDefinition)
Constructs an unlabelled RelationType with the specified type definition. |
|
RelationType(java.lang.String newLabel)
Constructs a labelled RelationType with the specified type label and no type definition. |
|
RelationType(java.lang.String newLabel,
int newValence)
Constructs a labelled RelationType with the specified type label and valence. |
|
RelationType(java.lang.String newLabel,
RelationTypeDefinition newDefinition)
Constructs a labelled RelationType with the specified type label and type definition. |
Method Summary | |
java.lang.String |
getComment()
Returns the comment string for this type. |
RelationType[] |
getImmediateSubTypes()
Returns the immediate subtypes of this type. |
RelationType[] |
getImmediateSuperTypes()
Returns the immediate supertypes of this type. |
java.lang.String |
getLabel()
Returns the type label for this type. |
RelationType[] |
getProperSubTypes()
Returns all subtypes of this type. |
RelationType[] |
getSuperProperTypes()
Returns all supertypes of this type. |
RelationTypeDefinition |
getTypeDefinition()
Returns the relation type definition for this type (if any). |
int |
getValence()
Returns the valence for this type, or -1 if the valence is undefined. |
boolean |
hasProperSubType(RelationType queryType)
Tests whether the specified type is a proper subtype of this type. |
boolean |
hasProperSuperType(RelationType queryType)
Tests whether the specified type is a proper supertype of this type. |
boolean |
hasSubType(RelationType queryType)
Tests whether the specified type is a subtype of this type. |
boolean |
hasSuperType(RelationType queryType)
Tests whether the specified type is a supertype of this type. |
static boolean |
matchRelationTypes(RelationType first,
RelationType second,
MatchingScheme matchingScheme)
Compares two relation types to decide if they match. |
void |
setComment(java.lang.String newComment)
Sets the comment string for this type. |
void |
setLabel(java.lang.String newLabel)
Sets the type label for this type. |
void |
setTypeDefinition(RelationTypeDefinition newDefinition)
Sets the type definition for this type. |
void |
setValence(int newValence)
Sets the valence for this type. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RelationType(java.lang.String newLabel, RelationTypeDefinition newDefinition)
newLabel
- the type label for this type.newDefinition
- the type definition for this type.public RelationType(java.lang.String newLabel, int newValence)
newLabel
- the type label for this type.newValence
- the valence for this type.public RelationType(java.lang.String newLabel)
newLabel
- the type label for this type.public RelationType(RelationTypeDefinition newDefinition)
newDefinition
- the type definition for this type.public RelationType()
Method Detail |
public void setLabel(java.lang.String newLabel) throws TypeChangeError
newLabel
- the string that is the label for this type.TypeChangeError
- if the type belongs to a hierarchy and the new label is already in use within it.public java.lang.String getLabel()
getLabel
in class notio.Type
public void setTypeDefinition(RelationTypeDefinition newDefinition)
newDefinition
- the new type definition for this type.public RelationTypeDefinition getTypeDefinition()
public void setValence(int newValence)
newValence
- the new valence for this type.TypeChangeError
- if a type definition has been specified for this type.Relation.isComplete()
public int getValence()
public RelationType[] getProperSubTypes()
public RelationType[] getSuperProperTypes()
public RelationType[] getImmediateSubTypes()
public RelationType[] getImmediateSuperTypes()
public boolean hasSubType(RelationType queryType)
queryType
- the type being tested.public boolean hasSuperType(RelationType queryType)
queryType
- the type being tested.public boolean hasProperSubType(RelationType queryType)
queryType
- the type being tested.public boolean hasProperSuperType(RelationType queryType)
queryType
- the type being tested.public static boolean matchRelationTypes(RelationType first, RelationType second, MatchingScheme matchingScheme)
first
- the first relation type being matched.second
- the second relation type being matched.matchingScheme
- the matching scheme that determines how the match is performed.public void setComment(java.lang.String newComment)
newComment
- the new comment string for this type.public java.lang.String getComment()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |