org.newsml.toolkit
Interface DescriptiveMetadata

All Superinterfaces:
AssignmentNode, BaseNode, CatalogNode, IdNode, PropertyNode

public interface DescriptiveMetadata
extends AssignmentNode, BaseNode, CatalogNode, IdNode, PropertyNode

Information about a news component's content.

Descriptive metadata provides information about the language, genre, subject matter, and intended audience for news information.

Version:
2.0
Author:
Reuters PLC

Method Summary
 AssignedFormalName getGenre()
          Get the genre of the news component.
 AssignedFormalName[] getLanguage()
          Get all Language children in an array.
 AssignedFormalName getLanguage(int index)
          Get one of the languages of the news component.
 int getLanguageCount()
          Count the languages present.
 OfInterestTo[] getOfInterestTo()
          Get all OfInterestTo children in an array.
 OfInterestTo getOfInterestTo(int index)
          Get an indication of the intended audience for a news component.
 int getOfInterestToCount()
          Count the OfInterestTo members.
 SubjectCode[] getSubjectCode()
          Get all SubjectCode children in an array.
 SubjectCode getSubjectCode(int index)
          Get a subject code for the news component.
 int getSubjectCodeCount()
          Count the subject codes present.
 TopicOccurrence[] getTopicOccurrence()
          Get all TopicOccurrence children in an array.
 TopicOccurrence getTopicOccurrence(int index)
          Get a topic associated with a news component.
 int getTopicOccurrenceCount()
          Count the topic occurrences present.
 
Methods inherited from interface org.newsml.toolkit.AssignmentNode
getAssignedBy, getAssignmentDateAndTime, getConfidence, getHowPresent, getImportance
 
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
 
Methods inherited from interface org.newsml.toolkit.PropertyNode
getProperty, getProperty, getPropertyCount
 

Method Detail

getLanguageCount

public int getLanguageCount()
Count the languages present.
Returns:
The number of languages.

getLanguage

public AssignedFormalName getLanguage(int index)
Get one of the languages of the news component.

It is unclear from NewsML documentation how this value is meant to interact with the language property (the xml:lang attribute) for the news component itself (see NewsComponent), so programmers should use this property with caution.

Parameters:
index - The index of the language, zero-based, numbered sequentially.
Returns:
A formal name, with assignment information, representing the language, or null if no language was provided at the specified index.

getLanguage

public AssignedFormalName[] getLanguage()
Get all Language children in an array.
Returns:
A (possibly-empty) array of Language children.

getGenre

public AssignedFormalName getGenre()
Get the genre of the news component.
Returns:
A formal name representing the genre.

getSubjectCodeCount

public int getSubjectCodeCount()
Count the subject codes present.
Returns:
The number of subject codes.

getSubjectCode

public SubjectCode getSubjectCode(int index)
Get a subject code for the news component.
Parameters:
index - The index of the subject code, zero-based, numbered sequentially.
Returns:
The subject code, or null if none was provided at the specified index.

getSubjectCode

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

getOfInterestToCount

public int getOfInterestToCount()
Count the OfInterestTo members.
Returns:
The number of OfInterestTo members.

getOfInterestTo

public OfInterestTo getOfInterestTo(int index)
Get an indication of the intended audience for a news component.
Parameters:
index - The index of the information, zero-based, numbered sequentially.
Returns:
Information about the intended audience..

getOfInterestTo

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

getTopicOccurrenceCount

public int getTopicOccurrenceCount()
Count the topic occurrences present.
Returns:
The number of topic occurrences.

getTopicOccurrence

public TopicOccurrence getTopicOccurrence(int index)
Get a topic associated with a news component.
Parameters:
index - The index of the information, zero-based, numbered sequentially.
Returns:
Text with assignment information attached.

getTopicOccurrence

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