org.newsml.toolkit
Interface NewsLines

All Superinterfaces:
BaseNode, IdNode

public interface NewsLines
extends BaseNode, IdNode

Container for a news component's news lines.

A NewsComponent may have a series of standard (and non-standard) news lines attached to it, such as the headline, byline, and dateline. All of those news lines are accessible through this interface. There are also special convenience methods to return headlines and subheadlines as grouped pairs in a HeadLineGroup.

News lines contain natural-language text intended for human readers, and do not necessarily follow rigid formats. The information in the news lines may be duplicated in some types of content (such as textual news stories) but not in others (such as photos).

Version:
2.0
Author:
Reuters PLC

Method Summary
 OriginText[] getByLine()
          Get all byline children in an array.
 OriginText getByLine(int index)
          Get a ByLine.
 int getByLineCount()
          Count the ByLines.
 OriginText[] getCopyrightLine()
          Get all CopyrightLine children in an array.
 OriginText getCopyrightLine(int index)
          Get a copyright line.
 int getCopyrightLineCount()
          Count the copyright lines.
 OriginText[] getCreditLine()
          Get all CreditLine children in an array.
 OriginText getCreditLine(int index)
          Get a credit line.
 int getCreditLineCount()
          Count the credit lines.
 OriginText[] getDateLine()
          Get all DateLine children in an array.
 OriginText getDateLine(int index)
          Get a dateline.
 int getDateLineCount()
          Count the datelines.
 OriginText[] getHeadLine()
          Get all headline children in an array.
 OriginText getHeadLine(int index)
          Get a headline.
 int getHeadLineCount()
          Count the headlines.
 HeadLineGroup[] getHeadLineGroup()
          Convenience method: get all HeadLineGroup children in an array.
 HeadLineGroup getHeadLineGroup(int index)
          Convenience method: get a headline/subheadline pair.
 int getHeadLineGroupCount()
          Convenience method: count the headline groups present.
 OriginText[] getKeywordLine()
          Get all KeywordLine children in an array.
 OriginText getKeywordLine(int index)
          Get a keyword line.
 int getKeywordLineCount()
          Count the keyword lines.
 NewsLine[] getNewsLine()
          Get all NewsLine children in an array.
 NewsLine getNewsLine(int index)
          Get a user-defined news line.
 int getNewsLineCount()
          Count the generic news lines.
 OriginText[] getRightsLine()
          Get all RightsLine children in an array.
 OriginText getRightsLine(int index)
          Get a rights line.
 int getRightsLineCount()
          Count the rights lines.
 OriginText[] getSeriesLine()
          Get all SeriesLine children in an array.
 OriginText getSeriesLine(int index)
          Get a series line.
 int getSeriesLineCount()
          Count the series lines.
 OriginText[] getSlugLine()
          Get all SlugLine children in an array.
 OriginText getSlugLine(int index)
          Get a slug line.
 int getSlugLineCount()
          Count the slug lines.
 OriginText[] getSubHeadLine()
          Get all subheadline children in an array.
 OriginText getSubHeadLine(int index)
          Get a subheadline.
 int getSubHeadLineCount()
          Count the subheadlines.
 
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.IdNode
getDuid, getEuid
 

Method Detail

getHeadLineCount

public int getHeadLineCount()
Count the headlines.
Returns:
The number of headlines present.

getHeadLine

public OriginText getHeadLine(int index)
Get a headline.

The headline contains a primary title for the NewsComponent.

Parameters:
index - The index of the headline, zero-based, numbered sequentially.
Returns:
Text representing the headline, or null if none was provided at the specified index.

getHeadLine

public OriginText[] getHeadLine()
Get all headline children in an array.
Returns:
A (possibly-empty) array of headline children.

getSubHeadLineCount

public int getSubHeadLineCount()
Count the subheadlines.
Returns:
The number of subheadlines present.

getSubHeadLine

public OriginText getSubHeadLine(int index)
Get a subheadline.

The subheadline contains an optional subtitle for the NewsComponent, linked with the preceding HeadLine in document order.

Note: HeadLine and SubHeadLine indices will not necessarily correspond, since some headlines may not be accompanied by subheadlines; use getHeadLineGroup(int) to get headlines and subheadlines grouped properly.

Parameters:
index - The index of the subheadline, zero-based, numbered sequentially.
Returns:
Text representing the subheadline, or null if none was provided at the specified index.

getSubHeadLine

public OriginText[] getSubHeadLine()
Get all subheadline children in an array.
Returns:
A (possibly-empty) array of subheadline children.

getByLineCount

public int getByLineCount()
Count the ByLines.
Returns:
The number of ByLines present.

getByLine

public OriginText getByLine(int index)
Get a ByLine.

The ByLine presents information about the authors or creators of the NewsComponent.

Parameters:
index - The index of the ByLine, zero-based, numbered sequentially.
Returns:
Text representing the ByLine, or null if none was provided at the specified index.

getByLine

public OriginText[] getByLine()
Get all byline children in an array.
Returns:
A (possibly-empty) array of byline children.

getDateLineCount

public int getDateLineCount()
Count the datelines.
Returns:
The number of datelines present.

getDateLine

public OriginText getDateLine(int index)
Get a dateline.

The byline presents information about the date when and/or location where the NewsComponent was created.

Parameters:
index - The index of the dateline, zero-based, numbered sequentially.
Returns:
Text representing the dateline, or null if none was provided at the specified index.

getDateLine

public OriginText[] getDateLine()
Get all DateLine children in an array.
Returns:
A (possibly-empty) array of DateLine children.

getCreditLineCount

public int getCreditLineCount()
Count the credit lines.
Returns:
The number of credit lines present.

getCreditLine

public OriginText getCreditLine(int index)
Get a credit line.

The credit line provides credits (attribution, contributions, and so on) for the NewsComponent.

Parameters:
index - The index of the credit line, zero-based, numbered sequentially.
Returns:
Text representing the credit line, or null if none was provided at the specified index.

getCreditLine

public OriginText[] getCreditLine()
Get all CreditLine children in an array.
Returns:
A (possibly-empty) array of CreditLine children.

getCopyrightLineCount

public int getCopyrightLineCount()
Count the copyright lines.
Returns:
The number of copyright lines.

getCopyrightLine

public OriginText getCopyrightLine(int index)
Get a copyright line.

A natural-language statement of copyright information for the NewsComponent.

Parameters:
index - The index of the copyright line, zero-based, numbered sequentially.
Returns:
Text representing the copyright line, or null if none was provided at the specified index.

getCopyrightLine

public OriginText[] getCopyrightLine()
Get all CopyrightLine children in an array.
Returns:
A (possibly-empty) array of CopyrightLine children.

getRightsLineCount

public int getRightsLineCount()
Count the rights lines.
Returns:
The number of rights lines present.

getRightsLine

public OriginText getRightsLine(int index)
Get a rights line.

A description of rights assigned for the NewsComponent (such as distribution and archiving).

Parameters:
index - The index of the rights line, zero-based, numbered sequentially.
Returns:
Text representing the rights line, or null if none was provided at the specified index.

getRightsLine

public OriginText[] getRightsLine()
Get all RightsLine children in an array.
Returns:
A (possibly-empty) array of RightsLine children.

getSeriesLineCount

public int getSeriesLineCount()
Count the series lines.
Returns:
The number of series lines present.

getSeriesLine

public OriginText getSeriesLine(int index)
Get a series line.

Information describing the role of the NewsComponent in a larger series.

Parameters:
index - The index of the series line, zero-based, numbered sequentially.
Returns:
Text representing the series line, or null if none was provided at the specified index.

getSeriesLine

public OriginText[] getSeriesLine()
Get all SeriesLine children in an array.
Returns:
A (possibly-empty) array of SeriesLine children.

getSlugLineCount

public int getSlugLineCount()
Count the slug lines.
Returns:
The number of slug lines present.

getSlugLine

public OriginText getSlugLine(int index)
Get a slug line.

An abbreviated string for referring to a news story. There is no fixed format for slug lines, and they will vary among providers.

Parameters:
index - The index of the slug line, zero-based, numbered sequentially.
Returns:
Text representing the slug line, or null if none was provided at the specified index.

getSlugLine

public OriginText[] getSlugLine()
Get all SlugLine children in an array.
Returns:
A (possibly-empty) array of SlugLine children.

getKeywordLineCount

public int getKeywordLineCount()
Count the keyword lines.
Returns:
The number of keyword lines present.

getKeywordLine

public OriginText getKeywordLine(int index)
Get a keyword line.

Displayable keywords relevant to a NewsComponent.

Parameters:
index - The index of the keyword line, zero-based, numbered sequentially.
Returns:
Text representing the keyword line, or null if none was provided at the specified index.

getKeywordLine

public OriginText[] getKeywordLine()
Get all KeywordLine children in an array.
Returns:
A (possibly-empty) array of KeywordLine children.

getNewsLineCount

public int getNewsLineCount()
Count the generic news lines.
Returns:
The number of generic news lines present.

getNewsLine

public NewsLine getNewsLine(int index)
Get a user-defined news line.

This method returns news lines of types not covered by the other methods.

Parameters:
index - The index of the news line, zero-based, numbered sequentially.
Returns:
The news line, or null if none was provided at the specified index.

getNewsLine

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

getHeadLineGroupCount

public int getHeadLineGroupCount()
Convenience method: count the headline groups present.
Returns:
The number of headline groups.
See Also:
getHeadLineCount()

getHeadLineGroup

public HeadLineGroup getHeadLineGroup(int index)
Convenience method: get a headline/subheadline pair.
Parameters:
index - The index of the headline group, zero-based, numbered sequentially.
Returns:
A group containing a headline and optional subheadline, or null if no group was provided at the index specified..
See Also:
getHeadLine(int), getSubHeadLine(int)

getHeadLineGroup

public HeadLineGroup[] getHeadLineGroup()
Convenience method: get all HeadLineGroup children in an array.
Returns:
A (possibly-empty) array of HeadLineGroup children.
See Also:
getHeadLine(), getSubHeadLine()