org.newsml.toolkit
Interface Resource

All Superinterfaces:
BaseNode, IdNode

public interface Resource
extends BaseNode, IdNode

Information about a single resource.

Version:
1.0
Author:
Reuters PLC

Method Summary
 DefaultVocabularyFor[] getDefaultVocabularyFor()
          Get all DefaultVocabularyFor children in an array.
 DefaultVocabularyFor getDefaultVocabularyFor(int index)
          Get a default vocabulary declaration for this resource.
 int getDefaultVocabularyForCount()
          Count the default vocabulary declarations.
 Text[] getUrl()
          Get all Url children in an array.
 Text getUrl(int index)
          Get a URL attached to the resource.
 int getUrlCount()
          Count the URLs
 Text getUrn()
          Get the URN attached to the resource, if any.
 
Methods inherited from interface org.newsml.toolkit.BaseNode
getSession, getXMLName
 
Methods inherited from interface org.newsml.toolkit.IdNode
getDuid, getEuid
 

Method Detail

getUrn

public Text getUrn()
Get the URN attached to the resource, if any.

A resource may have only a single URN.

Returns:
The URN as text, or null if none was provided.

getUrlCount

public int getUrlCount()
Count the URLs
Returns:
The number of URLs present.

getUrl

public Text getUrl(int index)
Get a URL attached to the resource.
Parameters:
index - The index of the resource, zero-based, numbered sequentially in document order.
Returns:
The URL as text, or null if none was present at the index provided.

getUrl

public Text[] getUrl()
Get all Url children in an array.
Returns:
A (possibly-empty) array of Url children.

getDefaultVocabularyForCount

public int getDefaultVocabularyForCount()
Count the default vocabulary declarations.
Returns:
The number of default vocabulary declarations present.

getDefaultVocabularyFor

public DefaultVocabularyFor getDefaultVocabularyFor(int index)
Get a default vocabulary declaration for this resource.
Parameters:
index - The index of the declaration, zero-based, numbered sequentially in document order.
Returns:
An object representing a default vocabulary declaration, or null if none was available at the index specified.

getDefaultVocabularyFor

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