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 int
FIELD_TYPE_IDENTITY
static int
FIELD_TYPE_NAME
static int
FIELD_TYPE_OCCURRENCE
static int
FIELD_TYPE_QUERY
static int
FIELD_TYPE_ROLE
-
Constructor Summary
Constructors Modifier Constructor Description protected
FieldDefinition(TopicIF topic, TopicMap tm)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
addValue(Topic topic, Object _value, LifeCycleListener listener)
boolean
equals(Object obj)
Cardinality
getCardinality()
Returns the cardinality of the field on this topic type.static FieldDefinition
getFieldDefinition(String fieldId, int fieldType, TopicMap tm)
static FieldDefinition
getFieldDefinition(String fieldId, TopicMap tm)
static FieldDefinition
getFieldDefinition(TopicIF fieldTopic, TopicMap tm)
abstract String
getFieldName()
Returns the name of this field definition.abstract int
getFieldType()
abstract LocatorIF
getLocator()
String
getValidationType()
Returns the validation type.abstract Collection<? extends Object>
getValues(Topic topic)
FieldsView
getValueView(FieldsView view)
ViewModes
getViewModes(FieldsView view)
int
hashCode()
abstract void
removeValue(Topic topic, Object _value, LifeCycleListener listener)
void
setCardinality(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)
-
-