Package net.ontopia.topicmaps.entry
Class URLTopicMapSource
java.lang.Object
net.ontopia.topicmaps.entry.URLTopicMapSource
- All Implemented Interfaces:
AutoCloseable,TopicMapSourceIF
INTERNAL: TopicMapSourceIF that can reference individual topic map
documents by their URL address. The properties id, title, url, and
syntax are the most commonly used. The syntaxes XTM, HyTM, and LTM
are currently supported.
- Since:
- 2.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected LocatorIFprotected booleanprotected booleanprotected Stringprotected ExternalReferenceHandlerIFprotected Stringprotected Collection<TopicMapReferenceIF>protected Stringprotected Stringprotected Stringprotected boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()PUBLIC: Closes the source by releasing references it holds to e.g.createTopicMap(String name, String baseAddress) PUBLIC: Creates a new topic map in the underlying source and returns a reference to the created topic map.getBase()INTERNAL: Gets the base locator of the topic maps retrieved from the source.INTERNAL: Gets the base address of the topic maps retrieved from the source.booleanINTERNAL: Gets the duplicate suppression flag.INTERNAL: Gets the external reference handler.booleangetId()PUBLIC: Gets the id of the source.INTERNAL: 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.INTERNAL: Returns the syntax of the document.getTitle()PUBLIC: Gets the title of the source.getUrl()INTERNAL: Gets the URL of the source topic map.booleanINTERNAL: Returns true if validation is on, false otherwise.voidrefresh()PUBLIC: Refreshes the collection of references.voidINTERNAL: Sets the base locator of the topic maps retrieved from the source.voidsetBaseAddress(String base_address) INTERNAL: Sets the base address of the topic maps retrieved from the source.voidsetDuplicateSuppression(boolean duplicate_suppression) INTERNAL: Sets the duplicate suppression flag.voidsetExternalReferenceHandler(ExternalReferenceHandlerIF ref_handler) INTERNAL: Sets the external reference handler.voidsetHidden(boolean hidden) voidPUBLIC: Sets the id of the source.voidsetReferenceId(String refid) INTERNAL: Sets the id of the topic map reference for this topic map source.voidINTERNAL: Specifies the syntax of the document.voidPUBLIC: Sets the title of the source.voidINTERNAL: Sets the URL of the source topic map.voidsetValidation(boolean validate) INTERNAL: Turn validation of XTM documents according to DTD on or off.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
-
refid
-
title
-
url
-
syntax
-
base_address
-
duplicate_suppression
protected boolean duplicate_suppression -
validate
protected boolean validate -
ref_handler
-
reflist
-
-
Constructor Details
-
URLTopicMapSource
public URLTopicMapSource() -
URLTopicMapSource
-
-
Method Details
-
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
-
getReferenceId
INTERNAL: Gets the id of the topic map reference for this topic map source. -
setReferenceId
INTERNAL: Sets the id of the topic map reference for this topic map source. -
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
-
getSyntax
INTERNAL: Returns the syntax of the document. -
setSyntax
INTERNAL: Specifies the syntax of the document. This property will be used to ensure that the topic map syntax is correctly recognized. The supported syntaxes are 'XTM', 'HyTM', and 'LTM'. If the syntax is not specified the class will attempt to guess it by looking at the address suffix. -
getUrl
INTERNAL: Gets the URL of the source topic map. -
setUrl
INTERNAL: Sets the URL of the source topic map. -
getBase
INTERNAL: Gets the base locator of the topic maps retrieved from the source. -
setBase
INTERNAL: Sets the base locator of the topic maps retrieved from the source. -
getBaseAddress
INTERNAL: Gets the base address of the topic maps retrieved from the source. The notation is assumed to be 'URI'. -
setBaseAddress
INTERNAL: Sets the base address of the topic maps retrieved from the source. The notation is assumed to be 'URI'. -
getDuplicateSuppression
public boolean getDuplicateSuppression()INTERNAL: Gets the duplicate suppression flag. If the flag is true duplicate suppression is to be performed when loading the topic maps. -
setDuplicateSuppression
public void setDuplicateSuppression(boolean duplicate_suppression) INTERNAL: Sets the duplicate suppression flag. If the flag is true duplicate suppression is to be performed when loading the topic maps. -
setValidation
public void setValidation(boolean validate) INTERNAL: Turn validation of XTM documents according to DTD on or off. The validation checks if the documents read follow the DTD, and will abort import if they do not.- Parameters:
validate- Will validate if true, will not if false.
-
getValidation
public boolean getValidation()INTERNAL: Returns true if validation is on, false otherwise. -
setExternalReferenceHandler
INTERNAL: Sets the external reference handler. -
getExternalReferenceHandler
INTERNAL: Gets the external reference handler. The reference handler will receive notifications on references to external topics and topic maps. -
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
-
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
-
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
-
getHidden
public boolean getHidden() -
setHidden
public void setHidden(boolean hidden)
-