ontopoly.model
Class Cardinality

java.lang.Object
  extended by ontopoly.model.Topic
      extended by ontopoly.model.Cardinality

public class Cardinality
extends Topic

Represents a cardinality that can be assigned to a field.


Constructor Summary
Cardinality(TopicIF topic, TopicMap tm)
          Creates a new Cardinality object.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
static java.util.List<Cardinality> getCardinalityTypes(TopicMap tm)
          Returns all available cardinalities.
static Cardinality getDefaultCardinality(FieldDefinition fieldDefinition)
          Returns the default cardinality (zero or more)
 LocatorIF getLocator()
           
 int getMaxCardinality()
           
 int getMinCardinality()
           
 boolean isExactlyOne()
           
 boolean isMaxOne()
          True if cardinality is 0..1 or 1..1.
 boolean isMinOne()
          True if cardinality is 1..* or 1..1.
 boolean isOneOrMore()
           
 boolean isZeroOrMore()
           
 boolean isZeroOrOne()
           
 
Methods inherited from class ontopoly.model.Topic
addTopicType, copyCharacteristics, findDependentObjects, getDependentObjects, getFieldInstances, getFieldInstances, getId, getMostSpecificTopicType, getName, getTopicIF, getTopicMap, getTopicTypes, hashCode, 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
 

Constructor Detail

Cardinality

public Cardinality(TopicIF topic,
                   TopicMap tm)
Creates a new Cardinality object.

Method Detail

equals

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

getLocator

public LocatorIF getLocator()

isZeroOrOne

public boolean isZeroOrOne()

isExactlyOne

public boolean isExactlyOne()

isZeroOrMore

public boolean isZeroOrMore()

isOneOrMore

public boolean isOneOrMore()

isMaxOne

public boolean isMaxOne()
True if cardinality is 0..1 or 1..1.


isMinOne

public boolean isMinOne()
True if cardinality is 1..* or 1..1.


getDefaultCardinality

public static Cardinality getDefaultCardinality(FieldDefinition fieldDefinition)
Returns the default cardinality (zero or more)


getCardinalityTypes

public static java.util.List<Cardinality> getCardinalityTypes(TopicMap tm)
Returns all available cardinalities.

Returns:
A list containing Cardinality objects of all available cardinalities.

getMinCardinality

public int getMinCardinality()

getMaxCardinality

public int getMaxCardinality()


Copyright © 2000-2012 Ontopia.