org.newsml.toolkit
Interface SubjectCode

All Superinterfaces:
AssignmentNode, BaseNode, IdNode

public interface SubjectCode
extends AssignmentNode, BaseNode, IdNode

An IPTC subject code from the IPTC Information Interchange Model (IIM).

The subject code is part of the DescriptiveMetadata for a NewsComponent.

Although the NewsML documentation limits this property to IPTC subject codes, the fact that the codes are formal names implies that other vocabularies could be used; programmers should take care using this interface until the IPTC clarifies the situation, since providers may choose to take a liberal interpretation.

Version:
1.0
Author:
Reuters PLC

Method Summary
 SubjectCodeItem[] getItem()
          Get all Item children in an array.
 SubjectCodeItem getItem(int index)
          Get an item from the subject code.
 int getItemCount()
          Count the items available in this subject code.
 
Methods inherited from interface org.newsml.toolkit.AssignmentNode
getAssignedBy, getAssignmentDateAndTime, getConfidence, getHowPresent, getImportance
 
Methods inherited from interface org.newsml.toolkit.BaseNode
getSession, getXMLName
 
Methods inherited from interface org.newsml.toolkit.IdNode
getDuid, getEuid
 

Method Detail

getItemCount

public int getItemCount()
Count the items available in this subject code.
Returns:
The number of items available.
See Also:
getItem(int)

getItem

public SubjectCodeItem getItem(int index)
Get an item from the subject code.

The item includes a single piece of Subject, SubjectMatter, or Subject information together with zero or more SubjectQualifiers.

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

getItem

public SubjectCodeItem[] getItem()
Get all Item children in an array.
Returns:
A (possibly-empty) array of Item children.