things.data
Interface ThingsPropertyViewReader

All Superinterfaces:
ThingsProperty
All Known Subinterfaces:
ThingsPropertyView
All Known Implementing Classes:
ThingsPropertyTreeBASIC, ThingsPropertyTreeRAM

public interface ThingsPropertyViewReader
extends ThingsProperty

The basic property view for read only.

Version:
1.0

Version History

EPG - Initial - 16 MAY 04
 
Author:
Erich P. Gatejen

Field Summary
 
Fields inherited from interface things.data.ThingsProperty
PROPERTY_COMMENT_CHARACTER, PROPERTY_CR, PROPERTY_EMPTY, PROPERTY_ESCAPE_CHARACTER, PROPERTY_ESCAPED_CR, PROPERTY_ESCAPED_LF, PROPERTY_LF, PROPERTY_LINE_CONTINUATION, PROPERTY_LINE_CONTINUATION_STRING, PROPERTY_LINE_EQUALITY, PROPERTY_LINE_SEPARATOR, PROPERTY_LINE_SEPARATOR_ASSTRING, PROPERTY_LINE_TERMINATION, PROPERTY_PATH_SEPARATOR
 
Method Summary
 ThingsPropertyViewReader branch(java.lang.String path)
          Branch the view to create a new view.
 java.lang.String getProperty(java.lang.String... pathElements)
          Get a property value as a string.
 java.lang.String getProperty(java.lang.String path)
          Get a property value as a string.
 java.lang.String[] getPropertyMultivalue(java.lang.String path)
          Get a property value as a multivalue.
 NVImmutable getPropertyNV(java.lang.String path)
          Get a property value as a multivalue.
 java.util.Collection<java.lang.String> ply(java.lang.String path)
          Get the ply at this path.
 java.util.Collection<java.lang.String> sub(java.lang.String path)
          Get all property names under this at this path.
 

Method Detail

branch

ThingsPropertyViewReader branch(java.lang.String path)
                                throws ThingsException
Branch the view to create a new view. The new view will have the path as its root.

Parameters:
path - the property path (relative to the view root)
Returns:
The new view.
Throws:
ThingsException

getProperty

java.lang.String getProperty(java.lang.String path)
                             throws ThingsException
Get a property value as a string. It will return null if the property is not set. If it is a multivalue, it will return it encoded to a single String.

Parameters:
path - the property name
Returns:
value of the property or null if it does not exist
Throws:
ThingsException

getProperty

java.lang.String getProperty(java.lang.String... pathElements)
                             throws ThingsException
Get a property value as a string. It will return null if the property is not set. If it is a multivalue, it will return it encoded to a single String.

Parameters:
pathElements - a stitch-able path.
Returns:
value of the property or null if it does not exist
Throws:
ThingsException

getPropertyMultivalue

java.lang.String[] getPropertyMultivalue(java.lang.String path)
                                         throws ThingsException
Get a property value as a multivalue. It will return null if the property is not set.

Parameters:
path - the property name
Returns:
value A array of the values.
Throws:
ThingsException

getPropertyNV

NVImmutable getPropertyNV(java.lang.String path)
                          throws ThingsException
Get a property value as a multivalue. It will return null if the property is not set.

Parameters:
path - the property name
Returns:
value of the property or null if it does not exist
Throws:
ThingsException
See Also:
NVImmutable

sub

java.util.Collection<java.lang.String> sub(java.lang.String path)
                                           throws ThingsException
Get all property names under this at this path.

Parameters:
path - a root path. If it is null, it'll return everything.
Returns:
a collection of strings
Throws:
ThingsException

ply

java.util.Collection<java.lang.String> ply(java.lang.String path)
                                           throws ThingsException
Get the ply at this path. It'll return all the node names at this path but no more (no sub properties).

Parameters:
path - a root path.
Returns:
a collection of strings
Throws:
ThingsException


Things.