org.newsml.toolkit
Interface NewsML

All Superinterfaces:
BaseNode, CatalogNode, IdNode

public interface NewsML
extends BaseNode, CatalogNode, IdNode

The top-level NewsML package.

This interface represents the root of the NewsML content tree. The NewsML specification defines packaging and metadata, but not content: in other words, a NewsML package shows how news objects go together, and provides information (metadata) about the news objects, but the objects themselves will appear in other formats (either XML-based or non XML-based).

The package contains two major parts: the news envelope (see getNewsEnvelope()), which is roughly equivalent to the address on the outside of a package, and a list of news items (see getNewsItem(int)), which assemble collections of news objects by theme or content.

Version:
2.0
Author:
Reuters PLC

Method Summary
 NewsEnvelope getNewsEnvelope()
          Get the envelope for the NewsML package.
 NewsItem[] getNewsItem()
          Get all NewsItem children in an array.
 NewsItem getNewsItem(int index)
          Get one of the top-level news items.
 int getNewsItemCount()
          Count the top-level news items.
 TopicSet[] getTopicSet()
          Get all TopicSet children in an array.
 TopicSet getTopicSet(int index)
          Get a topic set attached to this component.
 int getTopicSetCount()
          Get the number of topic sets present.
 
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
 
Methods inherited from interface org.newsml.toolkit.CatalogNode
getCatalog
 
Methods inherited from interface org.newsml.toolkit.IdNode
getDuid, getEuid
 

Method Detail

getTopicSetCount

public int getTopicSetCount()
Get the number of topic sets present.
Returns:
The number of topic sets present.

getTopicSet

public TopicSet getTopicSet(int index)
Get a topic set attached to this component.
Parameters:
index - The index of the topic set, zero-based, numbered sequentially in document order.
Returns:
The topic set, or null if none was provided at the specified index.

getTopicSet

public TopicSet[] getTopicSet()
Get all TopicSet children in an array.
Returns:
A (possibly-empty) array of TopicSet children.

getNewsEnvelope

public NewsEnvelope getNewsEnvelope()
Get the envelope for the NewsML package. The envelope includes an identifier for the transmission, the sender(s), the intended recipient(s), the date and time of sending, the priority, and other related information.
Returns:
An object containing the envelope information (not null).

getNewsItemCount

public int getNewsItemCount()
Count the top-level news items.
Returns:
The number of top-level news items.

getNewsItem

public NewsItem getNewsItem(int index)
Get one of the top-level news items. Each of the items represents a self-contained, managed set of news information.
Parameters:
index - The index of the news item, zero-based, numbered sequentially.
Returns:
The news item at the specified index, or null if none was provided.

getNewsItem

public NewsItem[] getNewsItem()
Get all NewsItem children in an array.
Returns:
A (possibly-empty) array of NewsItem children.