Package ontopoly.model
Class IdentityField
- java.lang.Object
-
- ontopoly.model.Topic
-
- ontopoly.model.FieldDefinition
-
- ontopoly.model.IdentityField
-
public class IdentityField extends FieldDefinition
Represents an identify field.
-
-
Field Summary
-
Fields inherited from class ontopoly.model.FieldDefinition
FIELD_TYPE_IDENTITY, FIELD_TYPE_NAME, FIELD_TYPE_OCCURRENCE, FIELD_TYPE_QUERY, FIELD_TYPE_ROLE
-
-
Constructor Summary
Constructors Constructor Description IdentityField(TopicIF topic, TopicMap tm)Creates a new IdentityField object.IdentityField(TopicIF topic, TopicMap tm, IdentityType identityType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddValue(Topic topic, Object _value, LifeCycleListener listener)Replaces a subject locator of or adds a subject identifier to a topic.booleanequals(Object obj)StringgetFieldName()Returns the name of the IdentityField object.intgetFieldType()intgetHeight()Returns the assigned height of the identity text field.IdentityTypegetIdentityType()Gets the identity type.LocatorIFgetLocator()Collection<? extends Object>getValues(Topic topic)Returns either the subject locator or every subject identifier associated with the topic.intgetWidth()Returns the assigned width of the identity text field.booleanisItemIdentifier()True if this is the item identifier field type.booleanisSubjectIdentifier()True if this is the subject identifier field type.booleanisSubjectLocator()True if this is the subject locator field type.voidremoveValue(Topic topic, Object _value, LifeCycleListener listener)Removes the subject locator or a subject identifier from a topic.-
Methods inherited from class ontopoly.model.FieldDefinition
getCardinality, getFieldDefinition, getFieldDefinition, getFieldDefinition, getValidationType, getValueView, getViewModes, hashCode, setCardinality
-
Methods inherited from class ontopoly.model.Topic
addTopicType, copyCharacteristics, findDependentObjects, getDependentObjects, getFieldInstances, getFieldInstances, getId, getMostSpecificTopicType, getName, getTopicIF, getTopicMap, getTopicTypes, isAssociationType, isFieldDefinition, isInstanceOf, isInstanceOf, isNameType, isOccurrenceType, isOntologyTopic, isOntologyType, isPrivateSystemTopic, isPublicSystemTopic, isRoleType, isSystemTopic, isTopicMap, isTopicType, remove, removeTopicType, toString
-
-
-
-
Constructor Detail
-
IdentityField
public IdentityField(TopicIF topic, TopicMap tm, IdentityType identityType)
-
-
Method Detail
-
getFieldType
public int getFieldType()
- Specified by:
getFieldTypein classFieldDefinition- Returns:
- an int that identifies this fieldType
-
getFieldName
public String getFieldName()
Returns the name of the IdentityField object.- Specified by:
getFieldNamein classFieldDefinition
-
getLocator
public LocatorIF getLocator()
- Specified by:
getLocatorin classFieldDefinition
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classFieldDefinition
-
getIdentityType
public IdentityType getIdentityType()
Gets the identity type.- Returns:
- the identity type.
-
isSubjectLocator
public boolean isSubjectLocator()
True if this is the subject locator field type.
-
isSubjectIdentifier
public boolean isSubjectIdentifier()
True if this is the subject identifier field type.
-
isItemIdentifier
public boolean isItemIdentifier()
True if this is the item identifier field type.
-
getValues
public Collection<? extends Object> getValues(Topic topic)
Returns either the subject locator or every subject identifier associated with the topic.- Specified by:
getValuesin classFieldDefinition- Parameters:
topic- topic from which the values is retrieved.- Returns:
- A collection of LocatorIF objects.
-
addValue
public void addValue(Topic topic, Object _value, LifeCycleListener listener)
Replaces a subject locator of or adds a subject identifier to a topic.- Specified by:
addValuein classFieldDefinition- Parameters:
_value- value which is going to be added to the topic.
-
removeValue
public void removeValue(Topic topic, Object _value, LifeCycleListener listener)
Removes the subject locator or a subject identifier from a topic.- Specified by:
removeValuein classFieldDefinition- Parameters:
_value- value which is going to be removed from the topic.
-
getHeight
public int getHeight()
Returns the assigned height of the identity text field.
-
getWidth
public int getWidth()
Returns the assigned width of the identity text field.
-
-