public class ResourceTopicMapSource extends Object implements TopicMapSourceIF
| Modifier and Type | Class and Description |
|---|---|
static class |
ResourceTopicMapSource.REF_TYPE |
| Modifier and Type | Field and Description |
|---|---|
protected LocatorIF |
base_address |
protected boolean |
duplicate_suppression |
protected boolean |
hidden |
protected String |
id |
protected ExternalReferenceHandlerIF |
ref_handler |
protected ResourceTopicMapSource.REF_TYPE |
ref_type |
protected String |
refid |
protected Collection<TopicMapReferenceIF> |
reflist |
protected String |
resourceName |
protected String |
syntax |
protected String |
title |
protected boolean |
validate |
| Constructor and Description |
|---|
ResourceTopicMapSource()
INTERNAL: Create a new empty
TopicMapSourceIF instance. |
ResourceTopicMapSource(String resourceName)
INTERNAL: Create a new
TopicMapSourceIF instance that references a
resource that can be located in the classpath. |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
PUBLIC: Closes the source by releasing references it holds to e.g.
|
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.
|
LocatorIF |
getBase()
INTERNAL: Gets the base locator of the topic maps retrieved from the
source.
|
String |
getBaseAddress()
INTERNAL: Gets the base address of the topic maps retrieved from the
source.
|
boolean |
getDuplicateSuppression()
INTERNAL: Gets the duplicate suppression flag.
|
ExternalReferenceHandlerIF |
getExternalReferenceHandler()
INTERNAL: Gets the external reference handler.
|
String |
getId()
PUBLIC: Gets the id of the source.
|
String |
getReferenceId()
INTERNAL: Gets the id of the topic map reference for this topic map source.
|
Collection<TopicMapReferenceIF> |
getReferences()
PUBLIC: Returns an unmodifiable collection of
TopicMapReferenceIFs found by the topic map source. |
String |
getResourceName()
INTERNAL: Gets the resource name of the source topic map.
|
String |
getSyntax()
INTERNAL: Returns the syntax of the document.
|
String |
getTitle()
PUBLIC: Gets the title of the source.
|
boolean |
getValidation()
INTERNAL: Returns true if validation is on, false otherwise.
|
void |
refresh()
PUBLIC: Refreshes the collection of references.
|
void |
setBase(LocatorIF base_address)
INTERNAL: Sets the base locator of the topic maps retrieved from the
source.
|
void |
setBaseAddress(String base_address)
INTERNAL: Sets the base address of the topic maps retrieved from the
source.
|
void |
setDuplicateSuppression(boolean duplicate_suppression)
INTERNAL: Sets the duplicate suppression flag.
|
void |
setExternalReferenceHandler(ExternalReferenceHandlerIF ref_handler)
INTERNAL: Sets the external reference handler.
|
void |
setId(String id)
PUBLIC: Sets the id of the source.
|
void |
setReferenceId(String refid)
INTERNAL: Sets the id of the topic map reference for this topic map source.
|
void |
setResourceName(String resourceName)
INTERNAL: Sets the resource name of the source topic map.
|
void |
setSyntax(String syntax)
INTERNAL: Specifies the syntax of the document.
|
void |
setTitle(String title)
PUBLIC: Sets the title of the source.
|
void |
setValidation(boolean validate)
INTERNAL: Turn validation of XTM documents according to DTD on or off.
|
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 String id
protected String refid
protected String title
protected String resourceName
protected ResourceTopicMapSource.REF_TYPE ref_type
protected String syntax
protected boolean hidden
protected LocatorIF base_address
protected boolean duplicate_suppression
protected boolean validate
protected ExternalReferenceHandlerIF ref_handler
protected Collection<TopicMapReferenceIF> reflist
public ResourceTopicMapSource()
TopicMapSourceIF instance.public ResourceTopicMapSource(String resourceName)
TopicMapSourceIF instance that references a
resource that can be located in the classpath. An example for a valid
resource name is 'net/ontopia/topicmaps/examples/ItalianOpera.ltm'.resourceName - the name of the topic map resource.public String getId()
TopicMapSourceIFgetId in interface TopicMapSourceIFpublic void setId(String id)
TopicMapSourceIFUnsupportedOperationException if it does not support
setting the id.setId in interface TopicMapSourceIFpublic String getTitle()
TopicMapSourceIFgetTitle in interface TopicMapSourceIFpublic void setTitle(String title)
TopicMapSourceIFsetTitle in interface TopicMapSourceIFpublic String getReferenceId()
public void setReferenceId(String refid)
public String getSyntax()
public void setSyntax(String syntax)
public String getResourceName()
public void setResourceName(String resourceName)
public LocatorIF getBase()
public void setBase(LocatorIF base_address)
public String getBaseAddress()
public void setBaseAddress(String base_address)
public boolean getDuplicateSuppression()
public void setDuplicateSuppression(boolean duplicate_suppression)
public void setValidation(boolean validate)
validate - Will validate if true, will not if false.public boolean getValidation()
public void setExternalReferenceHandler(ExternalReferenceHandlerIF ref_handler)
public ExternalReferenceHandlerIF getExternalReferenceHandler()
public Collection<TopicMapReferenceIF> getReferences()
TopicMapSourceIFTopicMapReferenceIFs found by the topic map source.getReferences in interface TopicMapSourceIFpublic void refresh()
TopicMapSourceIFrefresh in interface TopicMapSourceIFpublic void close()
TopicMapSourceIFclose in interface AutoCloseableclose in interface TopicMapSourceIFpublic boolean supportsCreate()
TopicMapSourceIFsupportsCreate in interface TopicMapSourceIFpublic boolean supportsDelete()
TopicMapSourceIFsupportsDelete in interface TopicMapSourceIFpublic TopicMapReferenceIF createTopicMap(String name, String baseAddress)
TopicMapSourceIFcreateTopicMap in interface TopicMapSourceIF