org.newsml.toolkit
Interface TopicSet
- All Superinterfaces:
- BaseNode, CatalogNode, CommentNode, FormalName, FormalNameNode, IdNode
- public interface TopicSet
- extends CatalogNode, CommentNode, FormalName
A collection of metadata.
- Version:
- 2.0
- Author:
- Reuters PLC
Methods inherited from interface org.newsml.toolkit.BaseNode |
getAttr, getChild, getChild, getChild, getChild, getChildCount, getChildCount, getParent, getPath, getSession, getXMLName, getXPath, insertAfter, insertAfter, insertAfter, insertAfter, insertAfterDuid, insertAfterDuid, insertBefore, insertBefore, insertBefore, insertBefore, insertBeforeDuid, insertBeforeDuid, insertChild, insertChild, insertFirst, insertFirst, insertLast, insertLast, removeChild, removeChild, removeSelf, replaceChild, replaceChild, replaceChild, replaceChild, replaceChild, replaceChild, setAttr, setAttr, toXML, toXML, unsetAttr, unsetAttr, writeXML, writeXML |
getTopicSetRefCount
public int getTopicSetRefCount()
- Count the topic-set references.
- Returns:
- The number of topic-set references present.
getTopicSetRef
public TopicSetRef getTopicSetRef(int index)
- Get a reference to another topic set.
- Parameters:
index
- The index of the topic set reference, zero-based,
numbered sequentially in document order.- Returns:
- The reference, or null if none was provided at the
specified index.
getTopicSetRef
public TopicSetRef[] getTopicSetRef()
- Get all TopicSetRef children in an array.
- Returns:
- A (possibly-empty) array of TopicSetRef children.
getTopicCount
public int getTopicCount()
- Count the topics.
- Returns:
- The number of topics present.
getTopic
public Topic getTopic(int index)
- Get a topic in the topic set.
- Parameters:
index
- The index of the topic, zero-based, numbered
sequentially in document order.- Returns:
- The topic, or null if none was provided at the specified
index.
getTopic
public Topic[] getTopic()
- Get all Topic children in an array.
- Returns:
- A (possibly-empty) array of Topic children.
findTopic
public Topic findTopic(String name,
String scheme,
boolean useExternal)
throws IOException
- Find a topic given a formal name and scheme.
- Parameters:
name
- The single-part formal name to search for.scheme
- The scheme to search for, or null if none is used.useExternal
- True if the function should look outside
the current document.- Returns:
- The first matching Topic, or null if none is found
in the TopicSet or any external TopicSets it refers to.
- Throws:
IOException
- If there is an error processing an
external TopicSet linked by an HTTP URL.