ontopoly.model
Class TopicType

java.lang.Object
  extended by ontopoly.model.Topic
      extended by ontopoly.model.AbstractTypingTopic
          extended by ontopoly.model.TopicType

public class TopicType
extends AbstractTypingTopic

INTERNAL: Represents a topic type.


Constructor Summary
TopicType(TopicIF currTopic, TopicMap tm)
           
 
Method Summary
 FieldAssignment addField(FieldDefinition fieldDefinition)
           
 AssociationType createAssociationType()
           
 Topic createInstance(java.lang.String name)
          Create a new topic instance of this topic type.
 NameType createNameType()
           
 OccurrenceType createOccurrenceType()
           
 QueryField createQueryField()
           
 java.util.Collection<TopicType> getAllSubTypes()
          Gets the all subtypes (direct and indirect) of this type.
 java.util.Collection<? extends FieldDefinition> getDeclaredByFields()
          Returns the field definitions that are declared for this typing topic.
 java.util.Collection<TopicType> getDirectSubTypes()
          Gets the direct subtypes of this type.
 java.util.List<FieldAssignment> getFieldAssignments()
          Returns the FieldAssignments for this topic type.
 java.util.List<FieldAssignment> getFieldAssignments(FieldsView view)
           
 java.util.List<FieldsView> getFieldViews(FieldsView fieldsView)
           
 java.util.List<Topic> getInstances()
          Returns the set of all instances of this topic type.
 LocatorIF getLocatorIF()
          Gets the LocatorIF for this typing topic.
 TopicType getSuperType()
          Returns the supertype of this type, or null if there is none.
 boolean hasHierarchy()
          Tests whether this topic type has a hierarchy-forming association type attached to it.
 boolean isAbstract()
          Tests whether this topic type is abstract.
 boolean isLargeInstanceSet()
          Tests whether this topic type has a large instance set.
 void removeField(FieldDefinition fieldDefinition)
           
 java.util.List<Topic> searchAll(java.lang.String searchTerm)
          Returns the topics that matches the given search term.
 
Methods inherited from class ontopoly.model.AbstractTypingTopic
isHidden, isReadOnly
 
Methods inherited from class ontopoly.model.Topic
addTopicType, copyCharacteristics, equals, 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

TopicType

public TopicType(TopicIF currTopic,
                 TopicMap tm)
Method Detail

isAbstract

public boolean isAbstract()
Tests whether this topic type is abstract.

Returns:
true if this topic type is abstract.

isLargeInstanceSet

public boolean isLargeInstanceSet()
Tests whether this topic type has a large instance set.


hasHierarchy

public boolean hasHierarchy()
Tests whether this topic type has a hierarchy-forming association type attached to it.


getDirectSubTypes

public java.util.Collection<TopicType> getDirectSubTypes()
Gets the direct subtypes of this type.

Returns:
A Collection of TopicType objects.

getAllSubTypes

public java.util.Collection<TopicType> getAllSubTypes()
Gets the all subtypes (direct and indirect) of this type.

Returns:
A Collection of TopicType objects.

getSuperType

public TopicType getSuperType()
Returns the supertype of this type, or null if there is none.


addField

public FieldAssignment addField(FieldDefinition fieldDefinition)

removeField

public void removeField(FieldDefinition fieldDefinition)

createNameType

public NameType createNameType()

createQueryField

public QueryField createQueryField()

createOccurrenceType

public OccurrenceType createOccurrenceType()

createAssociationType

public AssociationType createAssociationType()

getFieldAssignments

public java.util.List<FieldAssignment> getFieldAssignments()
Returns the FieldAssignments for this topic type. These are sorted by the field order field on the field types. In addition, fields are inherited from all ancestor types.

Note that if isSystemTopic(), the list of fields will always contain the default name type with the "exactly one" cardinality at the very top


getFieldAssignments

public java.util.List<FieldAssignment> getFieldAssignments(FieldsView view)

getInstances

public java.util.List<Topic> getInstances()
Returns the set of all instances of this topic type.

Returns:
A collection of Topic objects.

createInstance

public Topic createInstance(java.lang.String name)
Create a new topic instance of this topic type.


getLocatorIF

public LocatorIF getLocatorIF()
Description copied from class: AbstractTypingTopic
Gets the LocatorIF for this typing topic. The locator is the PSI used by the ontology topic map model.p

Specified by:
getLocatorIF in class AbstractTypingTopic
Returns:
the LocatorIF for this typing topic.

searchAll

public java.util.List<Topic> searchAll(java.lang.String searchTerm)
Returns the topics that matches the given search term. Only topics of allowed player types are returned.

Returns:
a collection of Topic objects

getDeclaredByFields

public java.util.Collection<? extends FieldDefinition> getDeclaredByFields()
Description copied from class: AbstractTypingTopic
Returns the field definitions that are declared for this typing topic.

Specified by:
getDeclaredByFields in class AbstractTypingTopic
Returns:
a list of FieldDefinitions.

getFieldViews

public java.util.List<FieldsView> getFieldViews(FieldsView fieldsView)


Copyright © 2000-2012 Ontopia.