Package net.ontopia.topicmaps.impl.rdbms
Class RDBMSPatternSingleTopicMapSource
java.lang.Object
net.ontopia.topicmaps.impl.rdbms.RDBMSPatternSingleTopicMapSource
- All Implemented Interfaces:
AutoCloseable,TopicMapSourceIF
PUBLIC: A topic map source that refers to single reference that is
located by pattern. If multiple topic maps match the pattern then
the topic map with the highest object id is chosen. This source is
therefore able to swap to later versions of the same topic map when
the topic map repository is refreshed.
- Since:
- 3.4.2
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected LocatorIFprotected Stringprotected Stringprotected Stringprotected Stringprotected RDBMSTopicMapReferenceprotected Stringprotected RDBMSStorageprotected String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()PUBLIC: Closes the source by releasing references it holds to e.g.protected RDBMSStoragecreateTopicMap(String name, String baseAddress) PUBLIC: Creates a new topic map in the underlying source and returns a reference to the created topic map.PUBLIC: Gets the base address of the topic maps retrieved from the source.getId()PUBLIC: Gets the id of the source.getMatch()PUBLIC: Returns the match type used by the source.PUBLIC: Returns the pattern value used by the source.PUBLIC: Gets the database property file containing configuration parameters for accessing the rdbms database.PUBLIC: Gets the id of the topic map reference for this topic map source.PUBLIC: Returns an unmodifiable collection ofTopicMapReferenceIFs found by the topic map source.getTitle()PUBLIC: Gets the title of the source.voidrefresh()PUBLIC: Refreshes the collection of references.voidsetBaseAddress(String base_address) PUBLIC: Sets the base address of the topic maps retrieved from the source.voidPUBLIC: Sets the id of the source.voidPUBLIC: Sets the match type used by the source.voidsetPattern(String pattern) PUBLIC: Sets the pattern value used by the source.voidsetPropertyFile(String propfile) PUBLIC: Sets the database property file containing configuration parameters for accessing the rdbms database.voidsetReferenceId(String referenceId) PUBLIC: Sets the id of the topic map reference for this topic map source.voidPUBLIC: Sets the title of the source.booleanPUBLIC: Returns true if the source supports creating new topic maps with the createTopicMap.booleanPUBLIC: Returns true if the source supports deleting topic map with the TopicMapReferenceIF.delete() method.
-
Field Details
-
id
-
referenceId
-
title
-
base_address
-
propfile
-
match
-
pattern
-
reference
-
storage
-
-
Constructor Details
-
RDBMSPatternSingleTopicMapSource
public RDBMSPatternSingleTopicMapSource()
-
-
Method Details
-
createTopicMap
Description copied from interface:TopicMapSourceIFPUBLIC: 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:
createTopicMapin interfaceTopicMapSourceIF
-
getReferences
Description copied from interface:TopicMapSourceIFPUBLIC: Returns an unmodifiable collection ofTopicMapReferenceIFs found by the topic map source.- Specified by:
getReferencesin interfaceTopicMapSourceIF
-
refresh
public void refresh()Description copied from interface:TopicMapSourceIFPUBLIC: 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:
refreshin interfaceTopicMapSourceIF
-
close
public void close()Description copied from interface:TopicMapSourceIFPUBLIC: Closes the source by releasing references it holds to e.g. database or file system objects.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceTopicMapSourceIF
-
getId
Description copied from interface:TopicMapSourceIFPUBLIC: Gets the id of the source.- Specified by:
getIdin interfaceTopicMapSourceIF
-
setId
Description copied from interface:TopicMapSourceIFPUBLIC: 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 anUnsupportedOperationExceptionif it does not support setting the id.- Specified by:
setIdin interfaceTopicMapSourceIF
-
getTitle
Description copied from interface:TopicMapSourceIFPUBLIC: Gets the title of the source.- Specified by:
getTitlein interfaceTopicMapSourceIF
-
setTitle
Description copied from interface:TopicMapSourceIFPUBLIC: Sets the title of the source.- Specified by:
setTitlein interfaceTopicMapSourceIF
-
getMatch
PUBLIC: Returns the match type used by the source. -
setMatch
PUBLIC: Sets the match type used by the source. This can either be 'title' or 'comments'. The default is 'title'. -
getPattern
PUBLIC: Returns the pattern value used by the source. -
setPattern
PUBLIC: Sets the pattern value used by the source. This is typically the title of the topic map, but can also be the comments attached to a topic map. Which of the two the pattern matches depends on the match type given. -
supportsCreate
public boolean supportsCreate()Description copied from interface:TopicMapSourceIFPUBLIC: Returns true if the source supports creating new topic maps with the createTopicMap.- Specified by:
supportsCreatein interfaceTopicMapSourceIF
-
supportsDelete
public boolean supportsDelete()Description copied from interface:TopicMapSourceIFPUBLIC: Returns true if the source supports deleting topic map with the TopicMapReferenceIF.delete() method.- Specified by:
supportsDeletein interfaceTopicMapSourceIF
-
createStorage
- Throws:
IOException
-
getPropertyFile
PUBLIC: Gets the database property file containing configuration parameters for accessing the rdbms database. -
setPropertyFile
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:'. -
getReferenceId
PUBLIC: Gets the id of the topic map reference for this topic map source. -
setReferenceId
PUBLIC: Sets the id of the topic map reference for this topic map source. -
getBaseAddress
PUBLIC: Gets the base address of the topic maps retrieved from the source. The notation is assumed to be 'URI'. -
setBaseAddress
PUBLIC: Sets the base address of the topic maps retrieved from the source. The notation is assumed to be 'URI'.
-