|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.ontopia.topicmaps.entry.ResourceTopicMapSource
public class ResourceTopicMapSource
INTERNAL: TopicMapSourceIF that can reference individual topic map documents that contained in the classpath and can be loaded by a ClassLoader. The properties id, title, resourceName, and syntax are the most commonly used.
Nested Class Summary | |
---|---|
static class |
ResourceTopicMapSource.REF_TYPE
|
Field Summary | |
---|---|
protected LocatorIF |
base_address
|
protected boolean |
duplicate_suppression
|
protected boolean |
hidden
|
protected java.lang.String |
id
|
protected ExternalReferenceHandlerIF |
ref_handler
|
protected ResourceTopicMapSource.REF_TYPE |
ref_type
|
protected java.lang.String |
refid
|
protected java.util.Collection<TopicMapReferenceIF> |
reflist
|
protected java.lang.String |
resourceName
|
protected java.lang.String |
syntax
|
protected java.lang.String |
title
|
protected boolean |
validate
|
Constructor Summary | |
---|---|
ResourceTopicMapSource()
INTERNAL: Create a new empty TopicMapSourceIF instance. |
|
ResourceTopicMapSource(java.lang.String resourceName)
INTERNAL: Create a new TopicMapSourceIF instance that references a
resource that can be located in the classpath. |
Method Summary | |
---|---|
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. |
LocatorIF |
getBase()
INTERNAL: Gets the base locator of the topic maps retrieved from the source. |
java.lang.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. |
java.lang.String |
getId()
PUBLIC: Gets the id of the source. |
java.lang.String |
getReferenceId()
INTERNAL: Gets the id of the topic map reference for this topic map source. |
java.util.Collection<TopicMapReferenceIF> |
getReferences()
PUBLIC: Returns an unmodifiable collection of TopicMapReferenceIF s found by the topic map source. |
java.lang.String |
getResourceName()
INTERNAL: Gets the resource name of the source topic map. |
java.lang.String |
getSyntax()
INTERNAL: Returns the syntax of the document. |
java.lang.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(java.lang.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(java.lang.String id)
PUBLIC: Sets the id of the source. |
void |
setReferenceId(java.lang.String refid)
INTERNAL: Sets the id of the topic map reference for this topic map source. |
void |
setResourceName(java.lang.String resourceName)
INTERNAL: Sets the resource name of the source topic map. |
void |
setSyntax(java.lang.String syntax)
INTERNAL: Specifies the syntax of the document. |
void |
setTitle(java.lang.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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String id
protected java.lang.String refid
protected java.lang.String title
protected java.lang.String resourceName
protected ResourceTopicMapSource.REF_TYPE ref_type
protected java.lang.String syntax
protected boolean hidden
protected LocatorIF base_address
protected boolean duplicate_suppression
protected boolean validate
protected ExternalReferenceHandlerIF ref_handler
protected java.util.Collection<TopicMapReferenceIF> reflist
Constructor Detail |
---|
public ResourceTopicMapSource()
TopicMapSourceIF
instance.
public ResourceTopicMapSource(java.lang.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.Method Detail |
---|
public java.lang.String getId()
TopicMapSourceIF
getId
in interface TopicMapSourceIF
public void setId(java.lang.String id)
TopicMapSourceIF
UnsupportedOperationException
if it does not support
setting the id.
setId
in interface TopicMapSourceIF
public java.lang.String getTitle()
TopicMapSourceIF
getTitle
in interface TopicMapSourceIF
public void setTitle(java.lang.String title)
TopicMapSourceIF
setTitle
in interface TopicMapSourceIF
public java.lang.String getReferenceId()
public void setReferenceId(java.lang.String refid)
public java.lang.String getSyntax()
public void setSyntax(java.lang.String syntax)
public java.lang.String getResourceName()
public void setResourceName(java.lang.String resourceName)
public LocatorIF getBase()
public void setBase(LocatorIF base_address)
public java.lang.String getBaseAddress()
public void setBaseAddress(java.lang.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 java.util.Collection<TopicMapReferenceIF> getReferences()
TopicMapSourceIF
TopicMapReferenceIF
s found by the topic map source.
getReferences
in interface TopicMapSourceIF
public void refresh()
TopicMapSourceIF
refresh
in interface TopicMapSourceIF
public boolean supportsCreate()
TopicMapSourceIF
supportsCreate
in interface TopicMapSourceIF
public boolean supportsDelete()
TopicMapSourceIF
supportsDelete
in interface TopicMapSourceIF
public TopicMapReferenceIF createTopicMap(java.lang.String name, java.lang.String baseAddress)
TopicMapSourceIF
createTopicMap
in interface TopicMapSourceIF
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |