org.newsml.toolkit
Interface Resource

All Superinterfaces:
BaseNode, IdNode

public interface Resource
extends BaseNode, IdNode

Information about a single resource.

Version:
2.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.
 IdText[] getUrl()
          Get all Url children in an array.
 IdText getUrl(int index)
          Get a URL attached to the resource.
 int getUrlCount()
          Count the URLs
 IdText getUrn()
          Get the URN attached to the resource, if any.
 
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

getUrn

public IdText 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 IdText 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 IdText[] 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.