org.newsml.toolkit
Interface BasisForChoice
- All Superinterfaces:
- BaseNode, IdNode
- public interface BasisForChoice
- extends BaseNode, IdNode
Basis for choosing among equivalent news components or content items.
When a NewsComponent
is an equivalents list (see NewsComponent.isEquivalentsList()
) it may provide one or more hints
on how to select from the list. This interface provides an XPath
to the relevant information (requiring, unfortunately, access to
the full DOM tree) together with ranking information.
Note that the documentation does not specifically state that
basis for choice can apply to an equivalents list of NewsItem
or NewsItemRef
members in a news component; use
with caution until the IPTC clarifies the rules.
- Version:
- 1.0
- Author:
- Reuters PLC
Method Summary |
int |
getRank()
Rank this basis for choice. |
java.lang.String |
getXPath()
Get the XPath expression for choosing among the equivalents. |
getXPath
public java.lang.String getXPath()
- Get the XPath expression for choosing among the equivalents.
The XPath is relative to each of the children of the
NewsComponent
containing the basis for choice element.
- Returns:
- A string providing the XPath expression for choosing
among equivalent members.
getRank
public int getRank()
- Rank this basis for choice.
- Returns:
- An integer ranking this basis for choice among the
others (a lower number indicates higher importance), or -1
if no explicit rank was provided.