ontopoly.model
Class FieldDefinition

java.lang.Object
  extended by ontopoly.model.Topic
      extended by 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
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
protected FieldDefinition(TopicIF topic, TopicMap tm)
           
 
Method Summary
abstract  void addValue(Topic topic, java.lang.Object _value, LifeCycleListener listener)
           
 boolean equals(java.lang.Object obj)
           
 Cardinality getCardinality()
          Returns the cardinality of the field on this topic type.
static FieldDefinition getFieldDefinition(java.lang.String fieldId, int fieldType, TopicMap tm)
           
static FieldDefinition getFieldDefinition(java.lang.String fieldId, TopicMap tm)
           
static FieldDefinition getFieldDefinition(TopicIF fieldTopic, TopicMap tm)
           
abstract  java.lang.String getFieldName()
          Returns the name of this field definition.
abstract  int getFieldType()
           
abstract  LocatorIF getLocator()
           
 java.lang.String getValidationType()
          Returns the validation type.
abstract  java.util.Collection<? extends java.lang.Object> getValues(Topic topic)
           
 FieldsView getValueView(FieldsView view)
           
 ViewModes getViewModes(FieldsView view)
           
 int hashCode()
           
abstract  void removeValue(Topic topic, java.lang.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
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

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
Constructor Detail

FieldDefinition

protected FieldDefinition(TopicIF topic,
                          TopicMap tm)
Method Detail

getFieldType

public abstract int getFieldType()
Returns:
an int that identifies this fieldType

getFieldName

public abstract java.lang.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 java.lang.String getValidationType()
Returns the validation type.


getValues

public abstract java.util.Collection<? extends java.lang.Object> getValues(Topic topic)

addValue

public abstract void addValue(Topic topic,
                              java.lang.Object _value,
                              LifeCycleListener listener)

removeValue

public abstract void removeValue(Topic topic,
                                 java.lang.Object _value,
                                 LifeCycleListener listener)

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class Topic

hashCode

public int hashCode()
Overrides:
hashCode in class Topic

getFieldDefinition

public static FieldDefinition getFieldDefinition(java.lang.String fieldId,
                                                 TopicMap tm)

getFieldDefinition

public static FieldDefinition getFieldDefinition(java.lang.String fieldId,
                                                 int fieldType,
                                                 TopicMap tm)

getFieldDefinition

public static FieldDefinition getFieldDefinition(TopicIF fieldTopic,
                                                 TopicMap tm)


Copyright © 2000-2012 Ontopia.