Package ontopoly.model
Class NameField
java.lang.Object
ontopoly.model.Topic
ontopoly.model.FieldDefinition
ontopoly.model.NameField
Represents a name 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 -
Method Summary
Modifier and TypeMethodDescriptionvoidaddValue(Topic topic, Object _value, LifeCycleListener listener) Adds a name to a topic.booleanReturns the name of this field definition.intintReturns the assigned height of the name text field.Gets the name type.Returns the names, which have this NameType object as type, associated with the topic.intgetWidth()Returns the assigned width of the name text field.voidremoveValue(Topic topic, Object _value, LifeCycleListener listener) Removes a name from a topic.Methods inherited from class ontopoly.model.FieldDefinition
getCardinality, getFieldDefinition, getFieldDefinition, getFieldDefinition, getValidationType, getValueView, getViewModes, hashCode, setCardinalityMethods 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 Details
-
NameField
-
NameField
-
-
Method Details
-
getFieldType
public int getFieldType()- Specified by:
getFieldTypein classFieldDefinition- Returns:
- an int that identifies this fieldType
-
getFieldName
Description copied from class:FieldDefinitionReturns the name of this field definition.- Specified by:
getFieldNamein classFieldDefinition
-
getLocator
- Specified by:
getLocatorin classFieldDefinition
-
equals
- Overrides:
equalsin classFieldDefinition
-
getNameType
Gets the name type.- Returns:
- the name type.
-
getValues
Returns the names, which have this NameType object as type, associated with the topic.- Specified by:
getValuesin classFieldDefinition- Parameters:
topic- the topic from which the values is retrieved.- Returns:
- a collection of TopicNameIFs.
-
addValue
Adds a name to a topic. The name has this NameType object as type. If no identical names are associated with the topic, a new one is added, but if some names already exist, all except the first one is deleted.- Specified by:
addValuein classFieldDefinition- Parameters:
_value- value which is going to be added to the topic.
-
removeValue
Removes a name from a topic. The name has this NameType object as type. If names with the value, _value, are associated with the topic, topic, they will be deleted.- 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 name text field. -
getWidth
public int getWidth()Returns the assigned width of the name text field.
-