ontopoly.model
Class FieldAssignment

java.lang.Object
  extended by ontopoly.model.FieldAssignment

public final class FieldAssignment
extends java.lang.Object

Represents a field as assigned to a topic type. The field itself is a FieldDefinition, and the topic type a TopicType. This object primarily holds the cardinality and order in the list of fields.


Constructor Summary
FieldAssignment(TopicType topicType, TopicType declaredTopicType, FieldDefinition fieldDefinition)
          Creates a new field assignment object.
FieldAssignment(TopicType topicType, TopicType declaredTopicType, FieldDefinition fieldDefinition, int cachedOrder)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 Cardinality getCardinality()
           
 TopicType getDeclaredTopicType()
          Returns the topic type.
 FieldDefinition getFieldDefinition()
          Returns the field type.
 int getOrder()
          Returns the ordering key of the field on this topic type.
 int getOrder(TopicType t)
          Returns the ordering key of the field on the topic type sent in as an argument.
 TopicType getTopicType()
          Returns the topic type.
 int hashCode()
           
 void moveAfter(FieldAssignment other)
          Change field order so that this field is ordered directly after the other field.
static void setOrder(TopicMap topicmap, TopicIF tt, TopicIF fd, int order, boolean replace)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldAssignment

public FieldAssignment(TopicType topicType,
                       TopicType declaredTopicType,
                       FieldDefinition fieldDefinition)
Creates a new field assignment object.


FieldAssignment

public FieldAssignment(TopicType topicType,
                       TopicType declaredTopicType,
                       FieldDefinition fieldDefinition,
                       int cachedOrder)
Method Detail

getTopicType

public TopicType getTopicType()
Returns the topic type.


getDeclaredTopicType

public TopicType getDeclaredTopicType()
Returns the topic type.


getFieldDefinition

public FieldDefinition getFieldDefinition()
Returns the field type.


getCardinality

public Cardinality getCardinality()

getOrder

public int getOrder()
Returns the ordering key of the field on this topic type.


getOrder

public int getOrder(TopicType t)
Returns the ordering key of the field on the topic type sent in as an argument.


setOrder

public static void setOrder(TopicMap topicmap,
                            TopicIF tt,
                            TopicIF fd,
                            int order,
                            boolean replace)

moveAfter

public void moveAfter(FieldAssignment other)
Change field order so that this field is ordered directly after the other field.

Parameters:
other - the field to order after.

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 2000-2012 Ontopia.