|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--notio.TypeHierarchy | +--notio.RelationTypeHierarchy
The relation type hierarchy class.
Field Summary | |
static java.lang.String |
ABSURD_TYPE_LABEL
The predefined type label for the absurd type. |
static java.lang.String |
UNIVERSAL_TYPE_LABEL
The predefined type label for the universal type. |
Constructor Summary | |
RelationTypeHierarchy()
Constructs a new RelationTypeHierarchy. |
Method Summary | |
void |
addSubTypesToType(RelationType subjectType,
RelationType[] newSubTypes)
Adds the specified list of subtypes as sub types to the subject type. |
void |
addSubTypeToType(RelationType subjectType,
RelationType newSubType)
Adds the specified subtype to the subject type. |
void |
addSuperTypesToType(RelationType subjectType,
RelationType[] newSuperTypes)
Adds the specified list of supertypes as super types to the subject type. |
void |
addSuperTypeToType(RelationType subjectType,
RelationType newSuperType)
Adds the specified supertype to the subject type. |
void |
addTypeToHierarchy(RelationType newType)
Adds a new type to this hierarchy with the Universal type as its only supertype, and the Absurd type as its only subtype. |
void |
addTypeToHierarchy(RelationType newType,
RelationType[] supertypes,
RelationType[] subtypes)
Adds a new type to the hierarchy with the specified supertypes and subtypes. |
void |
addTypeToHierarchy(RelationType newType,
RelationType supertype,
RelationType subtype)
Adds a new type to this hierarchy with the specified supertype and subtype. |
boolean |
getCaseSensitiveLabels()
Returns true if the processing of type labels in this hierarchy is case-sensitive. |
RelationType[] |
getImmediateSubTypesOf(RelationType subjectType)
Returns the immediate subtypes of the subject type in no particular order. |
RelationType[] |
getImmediateSuperTypesOf(RelationType subjectType)
Returns the immediate subtypes of the subject type in no particular order. |
RelationType[] |
getProperSubTypesOf(RelationType subjectType)
Returns all the subtypes of the subject type, not just the immediate subtypes, in no particular order. |
RelationType[] |
getProperSuperTypesOf(RelationType subjectType)
Returns all the supertypes of the subject type, not just the immediate supertypes, in no particular order. |
RelationType |
getTypeByLabel(java.lang.String label)
Looks up and returns the type object associated with the specified label. |
RelationType[] |
getUnlabelledTypes()
Returns all unlabelled types in this hierarchy in no particular order. |
boolean |
isProperSubTypeOf(RelationType subject,
RelationType object)
Determines whether subject is a subtype of object. |
boolean |
isProperSuperTypeOf(RelationType subject,
RelationType object)
Determines whether subject is a proper supertype of object. |
boolean |
isSubTypeOf(RelationType subject,
RelationType object)
Determines whether subject is a subtype of object. |
boolean |
isSuperTypeOf(RelationType subject,
RelationType object)
Determines whether subject is a supertype of object. |
void |
removeTypeFromHierarchy(RelationType deadType)
Removes a type from this hierarchy. |
void |
setCaseSensitiveLabels(boolean flag)
Sets a flag indicating whether or not the processing of type labels within this hierarchy is case-sensitive. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final java.lang.String UNIVERSAL_TYPE_LABEL
public static final java.lang.String ABSURD_TYPE_LABEL
Constructor Detail |
public RelationTypeHierarchy()
Method Detail |
public void addTypeToHierarchy(RelationType newType, RelationType[] supertypes, RelationType[] subtypes) throws TypeAddError, TypeChangeError
newType
- the type being added.supertypes
- the array of supertypes to be used, or null (assumes
universal type as only supertype).subtypes
- the array of subtypes to be used, or null (assumes
absurd type as only subtype).public void addTypeToHierarchy(RelationType newType, RelationType supertype, RelationType subtype) throws TypeAddError, TypeChangeError
newType
- the type being added.supertype
- the single supertype to be used, or null (assumes
universal type as subtype).subtype
- the single subtype to be used, or null (assumes
absurd type as subtype).public void addTypeToHierarchy(RelationType newType) throws TypeAddError
newType
- the type being added.public void addSuperTypesToType(RelationType subjectType, RelationType[] newSuperTypes) throws TypeChangeError
subjectType
- the type having supertypes added.newSuperTypes
- the array of types to be added as supertypes.public void addSuperTypeToType(RelationType subjectType, RelationType newSuperType) throws TypeChangeError
subjectType
- the type having a supertype added.newSuperType
- the supertype to be added.public void addSubTypesToType(RelationType subjectType, RelationType[] newSubTypes) throws TypeChangeError
subjectType
- the type having subtypes added.newSubTypes
- the array of types to be added as subtypes.public void addSubTypeToType(RelationType subjectType, RelationType newSubType) throws TypeChangeError
subjectType
- the type having a subtype added.newSubType
- the subtype to be added.public void removeTypeFromHierarchy(RelationType deadType) throws TypeRemoveError
deadType
- the type being removed.public RelationType getTypeByLabel(java.lang.String label)
label
- the label used to lookup.public RelationType[] getUnlabelledTypes()
public RelationType[] getProperSuperTypesOf(RelationType subjectType)
subjectType
- the type whose supertypes will be returned.public RelationType[] getProperSubTypesOf(RelationType subjectType)
subjectType
- the type whose subtypes will be returned.public RelationType[] getImmediateSuperTypesOf(RelationType subjectType)
subjectType
- the type whose immediate subtypes will be returned.public RelationType[] getImmediateSubTypesOf(RelationType subjectType)
subjectType
- the type whose immediate subtypes will be returned.public boolean isSubTypeOf(RelationType subject, RelationType object)
subject
- the potential subtype being tested.object
- the potential supertype being tested.public boolean isSuperTypeOf(RelationType subject, RelationType object)
subject
- the potential supertype being tested.object
- the potential subtype being tested.public boolean isProperSubTypeOf(RelationType subject, RelationType object)
subject
- the potential subtype being tested.object
- the potential supertype being tested.public boolean isProperSuperTypeOf(RelationType subject, RelationType object)
subject
- the potential supertype being tested.object
- the potential subtype being tested.public void setCaseSensitiveLabels(boolean flag)
flag
- the flag setting for case-sensitivity.public boolean getCaseSensitiveLabels()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |