net.ontopia.topicmaps.impl.rdbms
Class RDBMSSingleTopicMapSource

java.lang.Object
  extended by net.ontopia.topicmaps.impl.rdbms.RDBMSSingleTopicMapSource
All Implemented Interfaces:
TopicMapSourceIF

public class RDBMSSingleTopicMapSource
extends java.lang.Object
implements TopicMapSourceIF

PUBLIC: A topic map source that holds a reference to a single rdbms topic map. Individual topic maps can thus be pointed to by this source implementation.

Since:
1.3.4

Field Summary
protected  LocatorIF base_address
           
protected  boolean hidden
           
protected  java.lang.String id
           
protected  java.lang.String propfile
           
protected  RDBMSTopicMapReference reference
           
protected  java.lang.String referenceId
           
protected  java.lang.String title
           
protected  java.lang.String topicListeners
           
protected  long topicmap_id
           
 
Constructor Summary
RDBMSSingleTopicMapSource()
           
 
Method Summary
protected  RDBMSStorage createStorage()
           
 TopicMapReferenceIF createTopicMap(java.lang.String name, java.lang.String baseAddress)
          PUBLIC: Creates a new topic map in the underlying source and returns a reference to the created topic map.
 java.lang.String getAlias()
          Deprecated. Replaced by getReferenceId().
 java.lang.String getBaseAddress()
          PUBLIC: Gets the base address of the topic maps retrieved from the source.
 boolean getHidden()
           
 java.lang.String getId()
          PUBLIC: Gets the id of the source.
 java.lang.String getPropertyFile()
          PUBLIC: Gets the database property file containing configuration parameters for accessing the rdbms database.
 java.lang.String getReferenceId()
          PUBLIC: Gets the id of the topic map reference for this topic map source.
protected  java.lang.String getReferenceId(long topicmap_id)
           
 java.util.Collection getReferences()
          PUBLIC: Returns an unmodifiable collection of TopicMapReferenceIFs found by the topic map source.
 java.lang.String getTitle()
          PUBLIC: Gets the title of the source.
 java.lang.String getTopicListeners()
           
 java.lang.String getTopicMapId()
          PUBLIC: Gets the id of the topic map referenced.
 void refresh()
          PUBLIC: Refreshes the collection of references.
 void setAlias(java.lang.String alias)
          Deprecated. Replaced by setReferenceId(String).
 void setBaseAddress(java.lang.String base_address)
          PUBLIC: Sets the base address of the topic maps retrieved from the source.
 void setHidden(boolean hidden)
           
 void setId(java.lang.String id)
          PUBLIC: Sets the id of the source.
 void setPropertyFile(java.lang.String propfile)
          PUBLIC: Sets the database property file containing configuration parameters for accessing the rdbms database.
 void setReferenceId(java.lang.String referenceId)
          PUBLIC: Sets the id of the topic map reference for this topic map source.
 void setTitle(java.lang.String title)
          PUBLIC: Sets the title of the source.
 void setTopicListeners(java.lang.String topicListeners)
           
 void setTopicMapId(long id)
          PUBLIC: Sets the id of the topic map referenced.
 void setTopicMapId(java.lang.String id)
          PUBLIC: Sets the id of the topic map referenced.
 boolean supportsCreate()
          PUBLIC: Returns true if the source supports creating new topic maps with the createTopicMap.
 boolean supportsDelete()
          PUBLIC: Returns true if the source supports deleting topic map with the TopicMapReferenceIF.delete() method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected java.lang.String id

referenceId

protected java.lang.String referenceId

title

protected java.lang.String title

propfile

protected java.lang.String propfile

topicmap_id

protected long topicmap_id

base_address

protected LocatorIF base_address

hidden

protected boolean hidden

topicListeners

protected java.lang.String topicListeners

reference

protected RDBMSTopicMapReference reference
Constructor Detail

RDBMSSingleTopicMapSource

public RDBMSSingleTopicMapSource()
Method Detail

createTopicMap

public TopicMapReferenceIF createTopicMap(java.lang.String name,
                                          java.lang.String baseAddress)
Description copied from interface: TopicMapSourceIF
PUBLIC: Creates a new topic map in the underlying source and returns a reference to the created topic map. The method takes a name and the base address for the topic map to create.

Specified by:
createTopicMap in interface TopicMapSourceIF

getReferences

public java.util.Collection getReferences()
Description copied from interface: TopicMapSourceIF
PUBLIC: Returns an unmodifiable collection of TopicMapReferenceIFs found by the topic map source.

Specified by:
getReferences in interface TopicMapSourceIF

refresh

public void refresh()
Description copied from interface: TopicMapSourceIF
PUBLIC: Refreshes the collection of references. This lets the source look at its underlying data source to reflect any changes made since the last refresh.

Specified by:
refresh in interface TopicMapSourceIF

getId

public java.lang.String getId()
Description copied from interface: TopicMapSourceIF
PUBLIC: Gets the id of the source.

Specified by:
getId in interface TopicMapSourceIF

setId

public void setId(java.lang.String id)
Description copied from interface: TopicMapSourceIF
PUBLIC: Sets the id of the source. Note that this method is intended for use when the source is used in a TopicMapRepositoryIF. The source should throw an UnsupportedOperationException if it does not support setting the id.

Specified by:
setId in interface TopicMapSourceIF

getTitle

public java.lang.String getTitle()
Description copied from interface: TopicMapSourceIF
PUBLIC: Gets the title of the source.

Specified by:
getTitle in interface TopicMapSourceIF

setTitle

public void setTitle(java.lang.String title)
Description copied from interface: TopicMapSourceIF
PUBLIC: Sets the title of the source.

Specified by:
setTitle in interface TopicMapSourceIF

supportsCreate

public boolean supportsCreate()
Description copied from interface: TopicMapSourceIF
PUBLIC: Returns true if the source supports creating new topic maps with the createTopicMap.

Specified by:
supportsCreate in interface TopicMapSourceIF

supportsDelete

public boolean supportsDelete()
Description copied from interface: TopicMapSourceIF
PUBLIC: Returns true if the source supports deleting topic map with the TopicMapReferenceIF.delete() method.

Specified by:
supportsDelete in interface TopicMapSourceIF

createStorage

protected RDBMSStorage createStorage()
                              throws java.io.IOException
Throws:
java.io.IOException

getReferenceId

protected java.lang.String getReferenceId(long topicmap_id)

getPropertyFile

public java.lang.String getPropertyFile()
PUBLIC: Gets the database property file containing configuration parameters for accessing the rdbms database.


setPropertyFile

public void setPropertyFile(java.lang.String propfile)
PUBLIC: Sets the database property file containing configuration parameters for accessing the rdbms database. The propfile given with first be attempted loaded from the file system. If it does not exist on the file system it will be loaded from the classpath. If the access must be explicit then the property file name can be prefixed by 'file:' or 'classpath:'.


getTopicMapId

public java.lang.String getTopicMapId()
PUBLIC: Gets the id of the topic map referenced. Note that this id must be the string representation of a long.


setTopicMapId

public void setTopicMapId(java.lang.String id)
PUBLIC: Sets the id of the topic map referenced. Note that this id must be the string representation of a long.


setTopicMapId

public void setTopicMapId(long id)
PUBLIC: Sets the id of the topic map referenced.


getAlias

public java.lang.String getAlias()
Deprecated. Replaced by getReferenceId().

INTERNAL: Gets the alias of the topic map reference.


setAlias

public void setAlias(java.lang.String alias)
Deprecated. Replaced by setReferenceId(String).

INTERNAL: Sets the alias of the topic map reference.


getReferenceId

public java.lang.String getReferenceId()
PUBLIC: Gets the id of the topic map reference for this topic map source.


setReferenceId

public void setReferenceId(java.lang.String referenceId)
PUBLIC: Sets the id of the topic map reference for this topic map source.


getBaseAddress

public java.lang.String getBaseAddress()
PUBLIC: Gets the base address of the topic maps retrieved from the source. The notation is assumed to be 'URI'.


setBaseAddress

public void setBaseAddress(java.lang.String base_address)
PUBLIC: Sets the base address of the topic maps retrieved from the source. The notation is assumed to be 'URI'.


getHidden

public boolean getHidden()

setHidden

public void setHidden(boolean hidden)

getTopicListeners

public java.lang.String getTopicListeners()

setTopicListeners

public void setTopicListeners(java.lang.String topicListeners)


Copyright © 2000-2012 Ontopia.