org.newsml.toolkit
Interface Property

All Superinterfaces:
AssignmentNode, BaseNode, IdNode, PropertyNode

public interface Property
extends AssignmentNode, BaseNode, 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:
1.0
Author:
Reuters PLC

Method Summary
 java.lang.String getAllowedValues()
          Get the allowed values for the property.
 FormalName getName()
          Get the property's formal name.
 java.lang.String getValue()
          Get a literal string value for the property.
 java.lang.String 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
getSession, getXMLName
 
Methods inherited from interface org.newsml.toolkit.IdNode
getDuid, getEuid
 
Methods inherited from interface org.newsml.toolkit.PropertyNode
getProperty, getProperty, getPropertyCount
 

Method Detail

getName

public FormalName getName()
Get the property's formal name. The formal name represents the lvalue (x=...) part of the property assignment.
Returns:
A formal name for the property (not null).
See Also:
getValue(), getValueRef()

getValue

public java.lang.String 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:
A string value for the property or null if none was provided.
See Also:
getValueRef()

getValueRef

public java.lang.String 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:
A string identifier for an external value of some kind (possibly part of this or another XML document).
See Also:
getValue()

getAllowedValues

public java.lang.String 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:
A string representing the identifier of the vocabulary.
See Also:
getValue(), getValueRef()