public class RDBMSTopicMapSource extends Object implements TopicMapSourceIF
Modifier and Type | Field and Description |
---|---|
protected LocatorIF |
base_address |
protected boolean |
hidden |
protected String |
id |
protected Map<String,String> |
properties |
protected String |
propfile |
protected String |
queryfile |
protected Map<String,TopicMapReferenceIF> |
refmap |
protected RDBMSStorage |
storage |
protected boolean |
supportsCreate |
protected boolean |
supportsDelete |
protected String |
title |
protected String |
topicListeners |
Constructor and Description |
---|
RDBMSTopicMapSource()
PUBLIC: Creates an rdbms topic map source.
|
RDBMSTopicMapSource(Map<String,String> properties)
INTERNAL: Creates an rdbms topic map source with the specified
database properties.
|
RDBMSTopicMapSource(String propfile)
INTERNAL: Creates an rdbms topic map source with the database
property file set.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
PUBLIC: Closes the source by releasing references it holds to e.g.
|
protected RDBMSStorage |
createStorage() |
TopicMapReferenceIF |
createTopicMap(String name,
String baseAddress)
PUBLIC: Creates a new topic map in the underlying source
and returns a reference to the created topic map.
|
protected RDBMSTopicMapReference |
createTopicMapReference(String referenceId,
String title,
RDBMSStorage storage,
long topicmapId,
LocatorIF baseAddress) |
String |
getBaseAddress()
PUBLIC: Gets the base address of the topic maps retrieved from
the source.
|
boolean |
getHidden() |
String |
getId()
PUBLIC: Gets the id of the source.
|
String |
getPropertyFile()
PUBLIC: Gets the database property file containing configuration
parameters for accessing the rdbms database.
|
String |
getQueryfile()
PUBLIC: returns the additional SQL query file set by
setQueryfile(java.lang.String) . |
protected String |
getReferenceId(String baseAdress,
String title,
long topicmap_id) |
Collection<TopicMapReferenceIF> |
getReferences()
PUBLIC: Returns an unmodifiable collection of
TopicMapReferenceIF s found by the topic map source. |
boolean |
getSupportsCreate() |
boolean |
getSupportsDelete() |
String |
getTitle()
PUBLIC: Gets the title of the source.
|
String |
getTopicListeners() |
void |
refresh()
PUBLIC: Refreshes the collection of references.
|
void |
setBaseAddress(String base_address)
PUBLIC: Sets the base address of the topic maps retrieved from
the source.
|
void |
setHidden(boolean hidden) |
void |
setId(String id)
PUBLIC: Sets the id of the source.
|
void |
setPropertyFile(String propfile)
PUBLIC: Sets the database property file containing configuration
parameters for accessing the rdbms database.
|
void |
setQueryfile(String queryfile)
PUBLIC: Sets an additional SQL queries file to be loaded.
|
void |
setSupportsCreate(boolean supportsCreate) |
void |
setSupportsDelete(boolean supportsDelete) |
void |
setTitle(String title)
PUBLIC: Sets the title of the source.
|
void |
setTopicListeners(String topicListeners) |
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.
|
protected boolean supportsCreate
protected boolean supportsDelete
protected LocatorIF base_address
protected boolean hidden
protected String id
protected String title
protected String propfile
protected String queryfile
protected String topicListeners
protected Map<String,TopicMapReferenceIF> refmap
protected RDBMSStorage storage
public RDBMSTopicMapSource()
If the property file has not been given the 'net.ontopia.topicmaps.impl.rdbms.PropertyFile' system properties will be used.
public RDBMSTopicMapSource(String propfile)
public String getId()
TopicMapSourceIF
getId
in interface TopicMapSourceIF
public void setId(String id)
TopicMapSourceIF
UnsupportedOperationException
if it does not support
setting the id.setId
in interface TopicMapSourceIF
public String getTitle()
TopicMapSourceIF
getTitle
in interface TopicMapSourceIF
public void setTitle(String title)
TopicMapSourceIF
setTitle
in interface TopicMapSourceIF
public String getBaseAddress()
public void setBaseAddress(String base_address)
public String getPropertyFile()
public void setPropertyFile(String propfile)
public void setQueryfile(String queryfile)
queryfile
- The file to load. Will be passed to
StreamUtils.getInputStream(java.lang.String)
public String getQueryfile()
setQueryfile(java.lang.String)
.public Collection<TopicMapReferenceIF> getReferences()
TopicMapSourceIF
TopicMapReferenceIF
s found by the topic map source.getReferences
in interface TopicMapSourceIF
protected RDBMSStorage createStorage() throws IOException
IOException
public void refresh()
TopicMapSourceIF
refresh
in interface TopicMapSourceIF
public void close()
TopicMapSourceIF
close
in interface AutoCloseable
close
in interface TopicMapSourceIF
protected RDBMSTopicMapReference createTopicMapReference(String referenceId, String title, RDBMSStorage storage, long topicmapId, LocatorIF baseAddress)
public boolean supportsCreate()
TopicMapSourceIF
supportsCreate
in interface TopicMapSourceIF
public boolean getSupportsCreate()
public void setSupportsCreate(boolean supportsCreate)
public boolean supportsDelete()
TopicMapSourceIF
supportsDelete
in interface TopicMapSourceIF
public boolean getSupportsDelete()
public void setSupportsDelete(boolean supportsDelete)
public TopicMapReferenceIF createTopicMap(String name, String baseAddress)
TopicMapSourceIF
createTopicMap
in interface TopicMapSourceIF
public boolean getHidden()
public void setHidden(boolean hidden)
public String getTopicListeners()
public void setTopicListeners(String topicListeners)