Package ontopoly.model
Class FieldDefinition
- java.lang.Object
-
- ontopoly.model.Topic
-
- ontopoly.model.FieldDefinition
-
- Direct Known Subclasses:
IdentityField,NameField,OccurrenceField,QueryField,RoleField
public abstract class FieldDefinition extends Topic
Represents a field type, which may be a name type, an occurrence type, an identity field, or a combination of an association role and an association type.
-
-
Field Summary
Fields Modifier and Type Field Description static intFIELD_TYPE_IDENTITYstatic intFIELD_TYPE_NAMEstatic intFIELD_TYPE_OCCURRENCEstatic intFIELD_TYPE_QUERYstatic intFIELD_TYPE_ROLE
-
Constructor Summary
Constructors Modifier Constructor Description protectedFieldDefinition(TopicIF topic, TopicMap tm)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidaddValue(Topic topic, Object _value, LifeCycleListener listener)booleanequals(Object obj)CardinalitygetCardinality()Returns the cardinality of the field on this topic type.static FieldDefinitiongetFieldDefinition(String fieldId, int fieldType, TopicMap tm)static FieldDefinitiongetFieldDefinition(String fieldId, TopicMap tm)static FieldDefinitiongetFieldDefinition(TopicIF fieldTopic, TopicMap tm)abstract StringgetFieldName()Returns the name of this field definition.abstract intgetFieldType()abstract LocatorIFgetLocator()StringgetValidationType()Returns the validation type.abstract Collection<? extends Object>getValues(Topic topic)FieldsViewgetValueView(FieldsView view)ViewModesgetViewModes(FieldsView view)inthashCode()abstract voidremoveValue(Topic topic, Object _value, LifeCycleListener listener)voidsetCardinality(Cardinality cardinality)Sets the cardinality of the field on this topic type.-
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
-
-
-
-
Field Detail
-
FIELD_TYPE_ROLE
public static final int FIELD_TYPE_ROLE
- See Also:
- Constant Field Values
-
FIELD_TYPE_OCCURRENCE
public static final int FIELD_TYPE_OCCURRENCE
- See Also:
- Constant Field Values
-
FIELD_TYPE_NAME
public static final int FIELD_TYPE_NAME
- See Also:
- Constant Field Values
-
FIELD_TYPE_IDENTITY
public static final int FIELD_TYPE_IDENTITY
- See Also:
- Constant Field Values
-
FIELD_TYPE_QUERY
public static final int FIELD_TYPE_QUERY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getFieldType
public abstract int getFieldType()
- Returns:
- an int that identifies this fieldType
-
getFieldName
public abstract String getFieldName()
Returns the name of this field definition.
-
getLocator
public abstract LocatorIF getLocator()
-
getViewModes
public ViewModes getViewModes(FieldsView view)
-
getValueView
public FieldsView getValueView(FieldsView view)
-
getCardinality
public Cardinality getCardinality()
Returns the cardinality of the field on this topic type.
-
setCardinality
public void setCardinality(Cardinality cardinality)
Sets the cardinality of the field on this topic type.
-
getValidationType
public String getValidationType()
Returns the validation type.
-
getValues
public abstract Collection<? extends Object> getValues(Topic topic)
-
addValue
public abstract void addValue(Topic topic, Object _value, LifeCycleListener listener)
-
removeValue
public abstract void removeValue(Topic topic, Object _value, LifeCycleListener listener)
-
getFieldDefinition
public static FieldDefinition getFieldDefinition(String fieldId, TopicMap tm)
-
getFieldDefinition
public static FieldDefinition getFieldDefinition(String fieldId, int fieldType, TopicMap tm)
-
getFieldDefinition
public static FieldDefinition getFieldDefinition(TopicIF fieldTopic, TopicMap tm)
-
-