de.topicmapslab.majortom.database.readonly
Class JdbcReadOnlyTopic

java.lang.Object
  extended by de.topicmapslab.majortom.revision.core.ReadOnlyConstruct
      extended by de.topicmapslab.majortom.revision.core.ReadOnlyTopic
          extended by de.topicmapslab.majortom.database.readonly.JdbcReadOnlyTopic
All Implemented Interfaces:
de.topicmapslab.majortom.model.core.IConstruct, de.topicmapslab.majortom.model.core.ITopic, java.io.Serializable, java.lang.Comparable<de.topicmapslab.majortom.model.core.IConstruct>, org.tmapi.core.Construct, org.tmapi.core.Topic

public class JdbcReadOnlyTopic
extends ReadOnlyTopic

Author:
Sven Krosse
See Also:
Serialized Form

Field Summary
private  IConnectionProvider provider
           
private static long serialVersionUID
           
 
Constructor Summary
JdbcReadOnlyTopic(IConnectionProvider provider, de.topicmapslab.majortom.model.core.ITopic clone)
          constructor
 
Method Summary
private
<T> T
doReadHistoryValue(de.topicmapslab.majortom.model.store.TopicMapStoreParameterType type)
          Internal method to read the history values
 java.util.Collection<org.tmapi.core.Association> getAssociationsPlayed()
          
 java.lang.String getBestIdentifier(boolean withPrefix)
          
 java.lang.String getBestLabel()
          
 java.lang.String getBestLabel(org.tmapi.core.Topic theme)
          
 java.lang.String getBestLabel(org.tmapi.core.Topic theme, boolean strict)
          
 java.util.Set<org.tmapi.core.Locator> getItemIdentifiers()
          
 java.util.Set<org.tmapi.core.Name> getNames()
          
 java.util.Set<org.tmapi.core.Occurrence> getOccurrences()
          
 org.tmapi.core.Reifiable getReified()
          
 java.util.Set<org.tmapi.core.Role> getRolesPlayed()
          
 java.util.Set<org.tmapi.core.Locator> getSubjectIdentifiers()
          
 java.util.Set<org.tmapi.core.Locator> getSubjectLocators()
          
 java.util.Collection<org.tmapi.core.Topic> getSupertypes()
          
 java.util.Set<org.tmapi.core.Topic> getTypes()
          
 
Methods inherited from class de.topicmapslab.majortom.revision.core.ReadOnlyTopic
addSubjectIdentifier, addSubjectLocator, addSupertype, addType, createName, createName, createName, createName, createOccurrence, createOccurrence, createOccurrence, createOccurrence, createOccurrence, createOccurrence, getAssociationsPlayed, getAssociationsPlayed, getAssociationsPlayed, getCharacteristics, getCharacteristics, getCharacteristics, getCharacteristics, getNames, getNames, getNames, getOccurrences, getOccurrences, getOccurrences, getParent, getRolesPlayed, getRolesPlayed, mergeIn, removeSubjectIdentifier, removeSubjectLocator, removeSupertype, removeType
 
Methods inherited from class de.topicmapslab.majortom.revision.core.ReadOnlyConstruct
addItemIdentifier, compareTo, equals, getId, getTopicMap, hashCode, isRemoved, longId, remove, remove, removeItemIdentifier, setRemoved
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.tmapi.core.Topic
addItemIdentifier, remove
 
Methods inherited from interface de.topicmapslab.majortom.model.core.IConstruct
getTopicMap, isRemoved, longId, remove
 
Methods inherited from interface org.tmapi.core.Construct
equals, getId, hashCode, removeItemIdentifier
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

provider

private final IConnectionProvider provider
Constructor Detail

JdbcReadOnlyTopic

public JdbcReadOnlyTopic(IConnectionProvider provider,
                         de.topicmapslab.majortom.model.core.ITopic clone)
constructor

Parameters:
provider - the connection provider
clone - the non-read-only clone
Method Detail

getAssociationsPlayed

public java.util.Collection<org.tmapi.core.Association> getAssociationsPlayed()


getSupertypes

public java.util.Collection<org.tmapi.core.Topic> getSupertypes()


getNames

public java.util.Set<org.tmapi.core.Name> getNames()


getOccurrences

public java.util.Set<org.tmapi.core.Occurrence> getOccurrences()


getReified

public org.tmapi.core.Reifiable getReified()


getRolesPlayed

public java.util.Set<org.tmapi.core.Role> getRolesPlayed()


getSubjectIdentifiers

public java.util.Set<org.tmapi.core.Locator> getSubjectIdentifiers()


getSubjectLocators

public java.util.Set<org.tmapi.core.Locator> getSubjectLocators()


getTypes

public java.util.Set<org.tmapi.core.Topic> getTypes()


getItemIdentifiers

public java.util.Set<org.tmapi.core.Locator> getItemIdentifiers()


doReadHistoryValue

private <T> T doReadHistoryValue(de.topicmapslab.majortom.model.store.TopicMapStoreParameterType type)
Internal method to read the history values

Type Parameters:
T - the type of returned values
Parameters:
type - the argument specifies the value to fetch
Returns:
the value

getBestLabel

public java.lang.String getBestLabel()


getBestIdentifier

public java.lang.String getBestIdentifier(boolean withPrefix)


getBestLabel

public java.lang.String getBestLabel(org.tmapi.core.Topic theme)


getBestLabel

public java.lang.String getBestLabel(org.tmapi.core.Topic theme,
                                     boolean strict)