org.newsml.toolkit
Interface Property

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

public interface Property
extends AssignmentNode, BaseNode, FormalNameNode, IdNode, PropertyNode

A named metadata property.

NewsML news providers use this property to encode additional information for which there is not explicit NewsML markup. The Property class is recursive: a property can itself have properties.

Version:
2.0
Author:
Reuters PLC

Method Summary
 Text getAllowedValues()
          Get the allowed values for the property.
 Text getValue()
          Get a literal string value for the property.
 Text getValueRef()
          Get a pointer to a property's value.
 
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.FormalNameNode
findTopic, getDefaultScheme, getDefaultVocabulary, getName, getTopicSet, getVocabulary, toString, toString
 
Methods inherited from interface org.newsml.toolkit.IdNode
getDuid, getEuid
 
Methods inherited from interface org.newsml.toolkit.PropertyNode
getProperty, getProperty, getPropertyCount
 

Method Detail

getValue

public Text getValue()
Get a literal string value for the property. If a valueref (see getValueRef()) is also provided, then the valueref takes precedence and this represents a string rendition of it.
Returns:
Text containing a value for the property or null if none was provided.
See Also:
getValueRef()

getValueRef

public Text getValueRef()
Get a pointer to a property's value. The data can point to any arbitrary data inside or outside the document, using an internal reference or a URL or URN. While the target may be a TopicSet, in many circumstances it will be difficult to tell. Programmers should use this method with caution.
Returns:
Text containing an identifier for an external value of some kind (possibly part of this or another XML document).
See Also:
getValue()

getAllowedValues

public Text getAllowedValues()
Get the allowed values for the property. A pointer to a controlled vocabulary enumerating the allowed values for this property. The pointer may be an internal fragment identifier (starting with '#'), a URL, or a URN, presumably leading to a TopicSet. Programmers should use this method with caution, especially given the difficulty of resolving URNs.
Returns:
Text containing the identifier of the vocabulary.
See Also:
getValue(), getValueRef()