org.newsml.toolkit
Interface SubjectCodeItem


public interface SubjectCodeItem

A single qualified item in a subject code.

This interface represents the grouping of Subject, SubjectDetail, or SubjectMatter elements with SubjectQualifier elements. This grouping is implied by ordering, and is not represented by an explicit XML element in a NewsML document; as a result, this interface does not extend BaseNode.

Only one of getSubject(), getSubjectMatter(), and getSubjectDetail() will return non-null.

Version:
2.0
Author:
Reuters PLC
See Also:
SubjectCode

Method Summary
 AssignedFormalName getSubject()
          Get the IIM code for the subject of a news item.
 AssignedFormalName getSubjectDetail()
          Get the IIM code for a subject detail of a news item.
 AssignedFormalName getSubjectMatter()
          Get the IIM code for the subject matter of a news item.
 AssignedFormalName[] getSubjectQualifier()
          Get an array of all subject qualifiers present.
 AssignedFormalName getSubjectQualifier(int index)
          Get the IIM code for a subject qualifier.
 int getSubjectQualifierCount()
          Count the subject qualifiers.
 

Method Detail

getSubject

public AssignedFormalName getSubject()
Get the IIM code for the subject of a news item.
Returns:
A formal name representing the IIM code, or null if this item contains SubjectMatter or a SubjectDetail instead.
See Also:
getSubjectMatter(), getSubjectDetail()

getSubjectMatter

public AssignedFormalName getSubjectMatter()
Get the IIM code for the subject matter of a news item.
Returns:
A formal name representing the IIM code, or null if this item contains a Subject or SubjectDetail instead.
See Also:
getSubject(), getSubjectDetail()

getSubjectDetail

public AssignedFormalName getSubjectDetail()
Get the IIM code for a subject detail of a news item.
Returns:
A formal name representing the IIM code, or null if this item contains a Subject or SubjectMatter instead.
See Also:
getSubject(), getSubjectMatter()

getSubjectQualifierCount

public int getSubjectQualifierCount()
Count the subject qualifiers.
Returns:
The number of subject qualifiers present.

getSubjectQualifier

public AssignedFormalName getSubjectQualifier(int index)
Get the IIM code for a subject qualifier.

Note that the index applies only to qualifiers immediately following the current Subject, SubjectMatter, or SubjectDetail element in the XML document.

Parameters:
The - index of the subject qualifier, zero-based, numbered sequentially.
Returns:
A formal name representing the IIM code, or null if none was provided at the specified index.

getSubjectQualifier

public AssignedFormalName[] getSubjectQualifier()
Get an array of all subject qualifiers present.
Returns:
A (possibly empty) array of subject qualifiers.