org.newsml.toolkit
Interface EquivalentNode

All Superinterfaces:
BaseNode
All Known Subinterfaces:
ContentItem, NewsComponent, NewsItem, NewsItemRef

public interface EquivalentNode
extends BaseNode

An member within a NewsComponent.

A news component may contain one or more NewsItems and NewsItemRefs, NewsComponents, or ContentItems. These members may or may not be equivalents (see {NewsComponent#getEquivalentsList}); if they are equivalents, the NewsML document may have provided a basis for choosing among them. This interface provides a method that allows a client application quickly to find the node that is the basis for choice among the descendants of each member.

Version:
2.0
Author:
Reuters PLC

Method Summary
 BaseNode[] getBasisForChoiceNodes()
          Get the nodes that are the basis for choosing among the members.
 
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
 

Method Detail

getBasisForChoiceNodes

public BaseNode[] getBasisForChoiceNodes()
                                  throws NewsMLException
Get the nodes that are the basis for choosing among the members.

This method returns an array with one entry for each BasisForChoice element in the parent NewsComponent. If there is no match for the XPath expression in one of the BasisForChoice elements, the corresponding entry will be null. The nodes will be sorted as in NewsComponent.getRankedBasisForChoice().

Returns:
An array of nodes (possibly empty), in ranked order from most to least important basis for choice. Some entries may be null.
Throws:
NewsMLException - If there is an error in the XPath expression in the XML source document.