org.openptk.structure
Interface StructureIF

All Known Implementing Classes:
BasicStructure, Structure

public interface StructureIF

The Structure (interface and classes) is a generic class that supports two main features.

  1. A name and typed value. The value can be single or multi-valued. Supported value types:
  2. Can contain one or more child Structures.
A given Structure can contain either a name/value or have children, it can NOT contain both.

Author:
Scott Fehrman, Sun Microsystems, Inc.

Field Summary
static java.lang.String NAME_ACCESSED
           
static java.lang.String NAME_ACTION
           
static java.lang.String NAME_ACTIONID
           
static java.lang.String NAME_ACTIONS
           
static java.lang.String NAME_ALLOWMULTI
           
static java.lang.String NAME_ANCESTORS
           
static java.lang.String NAME_ANSWERS
           
static java.lang.String NAME_ATTRIBUTE
           
static java.lang.String NAME_ATTRIBUTES
           
static java.lang.String NAME_AUTHENTICATOR
           
static java.lang.String NAME_AUTHENTICATORID
           
static java.lang.String NAME_AUTHENTICATORS
           
static java.lang.String NAME_AVERAGE
           
static java.lang.String NAME_BODY
           
static java.lang.String NAME_CACHE
           
static java.lang.String NAME_CACHEID
           
static java.lang.String NAME_CACHES
           
static java.lang.String NAME_CATEGORY
           
static java.lang.String NAME_CHANGE
           
static java.lang.String NAME_CHILDREN
           
static java.lang.String NAME_CLASS
           
static java.lang.String NAME_CLASSNAME
           
static java.lang.String NAME_CLIENT
           
static java.lang.String NAME_CLIENTID
           
static java.lang.String NAME_CLIENTS
           
static java.lang.String NAME_CONTEXT
           
static java.lang.String NAME_CONTEXTID
           
static java.lang.String NAME_CONTEXTS
           
static java.lang.String NAME_CONVERTER
           
static java.lang.String NAME_CONVERTERID
           
static java.lang.String NAME_CONVERTERS
           
static java.lang.String NAME_COUNT
           
static java.lang.String NAME_CREATED
           
static java.lang.String NAME_CRYPTO
           
static java.lang.String NAME_DATA
           
static java.lang.String NAME_DEBUGLEVEL
           
static java.lang.String NAME_DECIDER
           
static java.lang.String NAME_DECIDERID
           
static java.lang.String NAME_DECIDERS
           
static java.lang.String NAME_DEFAULT
           
static java.lang.String NAME_DEFINITION
           
static java.lang.String NAME_DESCRIPTION
           
static java.lang.String NAME_DIGEST
           
static java.lang.String NAME_DOCUMENT
           
static java.lang.String NAME_EFFECT
           
static java.lang.String NAME_ENCRYPTED
           
static java.lang.String NAME_ENFORCER
           
static java.lang.String NAME_ENFORCERID
           
static java.lang.String NAME_ENFORCERS
           
static java.lang.String NAME_ENGINE
           
static java.lang.String NAME_ENVIRONMENT
           
static java.lang.String NAME_ENVIRONMENTS
           
static java.lang.String NAME_ERROR
           
static java.lang.String NAME_FROM
           
static java.lang.String NAME_ID
           
static java.lang.String NAME_INDEX
           
static java.lang.String NAME_LENGTH
           
static java.lang.String NAME_LEVEL
           
static java.lang.String NAME_LIBRARY
           
static java.lang.String NAME_MAXIMUM
           
static java.lang.String NAME_MEDIA
           
static java.lang.String NAME_META
           
static java.lang.String NAME_MIMETYPE
           
static java.lang.String NAME_MINIMUM
           
static java.lang.String NAME_MODE
           
static java.lang.String NAME_MODEL
           
static java.lang.String NAME_MODELID
           
static java.lang.String NAME_MODELS
           
static java.lang.String NAME_MODIFIED
           
static java.lang.String NAME_NAME
           
static java.lang.String NAME_OFFSET
           
static java.lang.String NAME_OPERATION
           
static java.lang.String NAME_OPERATIONS
           
static java.lang.String NAME_PARAMPATH
           
static java.lang.String NAME_PARAMQUERY
           
static java.lang.String NAME_PASSWORD
           
static java.lang.String NAME_PHASE
           
static java.lang.String NAME_PLUGIN
           
static java.lang.String NAME_PLUGINID
           
static java.lang.String NAME_PLUGINS
           
static java.lang.String NAME_POLICIES
           
static java.lang.String NAME_POLICY
           
static java.lang.String NAME_POLICYID
           
static java.lang.String NAME_PRINCIPAL
           
static java.lang.String NAME_PROPERTIES
           
static java.lang.String NAME_PROPERTY
           
static java.lang.String NAME_QUANTITY
           
static java.lang.String NAME_QUERY
           
static java.lang.String NAME_QUESTIONS
           
static java.lang.String NAME_READONLY
           
static java.lang.String NAME_RELATIONSHIP
           
static java.lang.String NAME_RELATIONSHIPID
           
static java.lang.String NAME_RELATIONSHIPS
           
static java.lang.String NAME_REQUEST
           
static java.lang.String NAME_REQUIRED
           
static java.lang.String NAME_RESOURCE
           
static java.lang.String NAME_RESOURCEID
           
static java.lang.String NAME_RESOURCES
           
static java.lang.String NAME_RESPONSE
           
static java.lang.String NAME_RESULTS
           
static java.lang.String NAME_SEARCH
           
static java.lang.String NAME_SECRET
           
static java.lang.String NAME_SERVICE
           
static java.lang.String NAME_SESSION
           
static java.lang.String NAME_SESSIONID
           
static java.lang.String NAME_SESSIONINFO
           
static java.lang.String NAME_SESSIONS
           
static java.lang.String NAME_SIBLINGS
           
static java.lang.String NAME_SORT
           
static java.lang.String NAME_STAT
           
static java.lang.String NAME_STATE
           
static java.lang.String NAME_STATID
           
static java.lang.String NAME_STATS
           
static java.lang.String NAME_STATUS
           
static java.lang.String NAME_STRUCTURE
           
static java.lang.String NAME_STRUCTURES
           
static java.lang.String NAME_SUBJECT
           
static java.lang.String NAME_SUBJECTID
           
static java.lang.String NAME_SUBJECTS
           
static java.lang.String NAME_TARGET
           
static java.lang.String NAME_TARGETID
           
static java.lang.String NAME_TARGETS
           
static java.lang.String NAME_TEMPLATE
           
static java.lang.String NAME_TO
           
static java.lang.String NAME_TYPE
           
static java.lang.String NAME_TYPES
           
static java.lang.String NAME_UNIQUEID
           
static java.lang.String NAME_UPDATED
           
static java.lang.String NAME_URI
           
static java.lang.String NAME_VALUE
           
static java.lang.String NAME_VALUES
           
static java.lang.String NAME_VERSION
           
static java.lang.String NAME_VIEW
           
static java.lang.String NAME_VIEWID
           
static java.lang.String NAME_VIEWS
           
static java.lang.String NAME_VIRTUAL
           
 
Method Summary
 void addChild(StructureIF struct)
          Adds the provided Structure as a Child.
 void addValue(boolean value)
          Add boolean to the Structure's value.
 void addValue(java.lang.Boolean value)
          Add Boolean to the Structure's value.
 void addValue(int value)
          Add integer to the Structure's value.
 void addValue(java.lang.Integer value)
          Add Integer to the Structure's value.
 void addValue(long value)
          Add long to the Structure value.
 void addValue(java.lang.Long value)
          Add Long to the Structure value.
 void addValue(java.lang.Object value)
          Add Object to the Structure's value.
 void addValue(java.lang.String value)
          Add String to the Structure's value.
 StructureIF getChild(java.lang.String name)
          Returns the specified Child Structure.
 java.util.List<StructureIF> getChildren()
          Returns all Child Structures as a List.
 java.util.List<StructureIF> getChildren(java.lang.String name)
          Returns a List (of Children) that match the provided name.
 StructureIF[] getChildrenAsArray()
          Returns all Child Structures as an Array.
 StructureIF[] getChildrenAsArray(java.lang.String name)
          Returns an Structure array (of Children) that match the provided name.
 java.lang.String[] getChildrenIds()
          Returns a String Array containing the Childrens id (name).
 java.lang.String getName()
          Get the Structure's name.
 StructureIF getParent()
          Returns the Structure's Parent (if it is a Child).
 State getState()
          Get the Structure's State.
 java.lang.Object getValue()
          Returns the value (if single valued) or the first value (is multi valued) If there is no value, null will be returned.
 java.lang.String getValueAsString()
          Returns a String representation of the (first) value.
 java.util.List<java.lang.Object> getValues()
          Returns the List of values (Object).
 java.lang.Object[] getValuesAsArray()
          Returns an Array of values (Object).
 java.lang.String getValuesAsString()
          Returns a String representation of all (List) the values.
 StructureType getValueType()
          Returns the Structure's Type.
 boolean hasChild(java.lang.String name)
          Returns TRUE if a Child exists with the specified name.
 boolean hasChildren()
          Returns TRUE if the Structure contains one or more Children.
 boolean isMultiValued()
          Returns TRUE if the Structure contains more than 1 (one) value.
 void setChild(int index, StructureIF child)
          Sets / Replaces a specific Child with the provided Structure.
 void setName(java.lang.String name)
          Set the Structure's name.
 void setParent(StructureIF struct)
          Set the Structure's parent.
 void setState(State state)
          Set the Structure's State.
 

Field Detail

NAME_ACCESSED

static final java.lang.String NAME_ACCESSED
See Also:
Constant Field Values

NAME_ACTION

static final java.lang.String NAME_ACTION
See Also:
Constant Field Values

NAME_ACTIONID

static final java.lang.String NAME_ACTIONID
See Also:
Constant Field Values

NAME_ACTIONS

static final java.lang.String NAME_ACTIONS
See Also:
Constant Field Values

NAME_ALLOWMULTI

static final java.lang.String NAME_ALLOWMULTI
See Also:
Constant Field Values

NAME_ANCESTORS

static final java.lang.String NAME_ANCESTORS
See Also:
Constant Field Values

NAME_ANSWERS

static final java.lang.String NAME_ANSWERS
See Also:
Constant Field Values

NAME_ATTRIBUTE

static final java.lang.String NAME_ATTRIBUTE
See Also:
Constant Field Values

NAME_ATTRIBUTES

static final java.lang.String NAME_ATTRIBUTES
See Also:
Constant Field Values

NAME_AUTHENTICATOR

static final java.lang.String NAME_AUTHENTICATOR
See Also:
Constant Field Values

NAME_AUTHENTICATORID

static final java.lang.String NAME_AUTHENTICATORID
See Also:
Constant Field Values

NAME_AUTHENTICATORS

static final java.lang.String NAME_AUTHENTICATORS
See Also:
Constant Field Values

NAME_AVERAGE

static final java.lang.String NAME_AVERAGE
See Also:
Constant Field Values

NAME_BODY

static final java.lang.String NAME_BODY
See Also:
Constant Field Values

NAME_CACHE

static final java.lang.String NAME_CACHE
See Also:
Constant Field Values

NAME_CACHEID

static final java.lang.String NAME_CACHEID
See Also:
Constant Field Values

NAME_CACHES

static final java.lang.String NAME_CACHES
See Also:
Constant Field Values

NAME_CATEGORY

static final java.lang.String NAME_CATEGORY
See Also:
Constant Field Values

NAME_CHANGE

static final java.lang.String NAME_CHANGE
See Also:
Constant Field Values

NAME_CHILDREN

static final java.lang.String NAME_CHILDREN
See Also:
Constant Field Values

NAME_CLASS

static final java.lang.String NAME_CLASS
See Also:
Constant Field Values

NAME_CLASSNAME

static final java.lang.String NAME_CLASSNAME
See Also:
Constant Field Values

NAME_CLIENT

static final java.lang.String NAME_CLIENT
See Also:
Constant Field Values

NAME_CLIENTID

static final java.lang.String NAME_CLIENTID
See Also:
Constant Field Values

NAME_CLIENTS

static final java.lang.String NAME_CLIENTS
See Also:
Constant Field Values

NAME_CONTEXT

static final java.lang.String NAME_CONTEXT
See Also:
Constant Field Values

NAME_CONTEXTID

static final java.lang.String NAME_CONTEXTID
See Also:
Constant Field Values

NAME_CONTEXTS

static final java.lang.String NAME_CONTEXTS
See Also:
Constant Field Values

NAME_CONVERTER

static final java.lang.String NAME_CONVERTER
See Also:
Constant Field Values

NAME_CONVERTERID

static final java.lang.String NAME_CONVERTERID
See Also:
Constant Field Values

NAME_CONVERTERS

static final java.lang.String NAME_CONVERTERS
See Also:
Constant Field Values

NAME_COUNT

static final java.lang.String NAME_COUNT
See Also:
Constant Field Values

NAME_CREATED

static final java.lang.String NAME_CREATED
See Also:
Constant Field Values

NAME_CRYPTO

static final java.lang.String NAME_CRYPTO
See Also:
Constant Field Values

NAME_DATA

static final java.lang.String NAME_DATA
See Also:
Constant Field Values

NAME_DEBUGLEVEL

static final java.lang.String NAME_DEBUGLEVEL
See Also:
Constant Field Values

NAME_DECIDER

static final java.lang.String NAME_DECIDER
See Also:
Constant Field Values

NAME_DECIDERID

static final java.lang.String NAME_DECIDERID
See Also:
Constant Field Values

NAME_DECIDERS

static final java.lang.String NAME_DECIDERS
See Also:
Constant Field Values

NAME_DEFAULT

static final java.lang.String NAME_DEFAULT
See Also:
Constant Field Values

NAME_DEFINITION

static final java.lang.String NAME_DEFINITION
See Also:
Constant Field Values

NAME_DESCRIPTION

static final java.lang.String NAME_DESCRIPTION
See Also:
Constant Field Values

NAME_DIGEST

static final java.lang.String NAME_DIGEST
See Also:
Constant Field Values

NAME_DOCUMENT

static final java.lang.String NAME_DOCUMENT
See Also:
Constant Field Values

NAME_EFFECT

static final java.lang.String NAME_EFFECT
See Also:
Constant Field Values

NAME_ENCRYPTED

static final java.lang.String NAME_ENCRYPTED
See Also:
Constant Field Values

NAME_ENFORCER

static final java.lang.String NAME_ENFORCER
See Also:
Constant Field Values

NAME_ENFORCERID

static final java.lang.String NAME_ENFORCERID
See Also:
Constant Field Values

NAME_ENFORCERS

static final java.lang.String NAME_ENFORCERS
See Also:
Constant Field Values

NAME_ENGINE

static final java.lang.String NAME_ENGINE
See Also:
Constant Field Values

NAME_ENVIRONMENT

static final java.lang.String NAME_ENVIRONMENT
See Also:
Constant Field Values

NAME_ENVIRONMENTS

static final java.lang.String NAME_ENVIRONMENTS
See Also:
Constant Field Values

NAME_ERROR

static final java.lang.String NAME_ERROR
See Also:
Constant Field Values

NAME_FROM

static final java.lang.String NAME_FROM
See Also:
Constant Field Values

NAME_ID

static final java.lang.String NAME_ID
See Also:
Constant Field Values

NAME_INDEX

static final java.lang.String NAME_INDEX
See Also:
Constant Field Values

NAME_LENGTH

static final java.lang.String NAME_LENGTH
See Also:
Constant Field Values

NAME_LEVEL

static final java.lang.String NAME_LEVEL
See Also:
Constant Field Values

NAME_LIBRARY

static final java.lang.String NAME_LIBRARY
See Also:
Constant Field Values

NAME_MAXIMUM

static final java.lang.String NAME_MAXIMUM
See Also:
Constant Field Values

NAME_MEDIA

static final java.lang.String NAME_MEDIA
See Also:
Constant Field Values

NAME_META

static final java.lang.String NAME_META
See Also:
Constant Field Values

NAME_MIMETYPE

static final java.lang.String NAME_MIMETYPE
See Also:
Constant Field Values

NAME_MINIMUM

static final java.lang.String NAME_MINIMUM
See Also:
Constant Field Values

NAME_MODE

static final java.lang.String NAME_MODE
See Also:
Constant Field Values

NAME_MODEL

static final java.lang.String NAME_MODEL
See Also:
Constant Field Values

NAME_MODELID

static final java.lang.String NAME_MODELID
See Also:
Constant Field Values

NAME_MODELS

static final java.lang.String NAME_MODELS
See Also:
Constant Field Values

NAME_MODIFIED

static final java.lang.String NAME_MODIFIED
See Also:
Constant Field Values

NAME_NAME

static final java.lang.String NAME_NAME
See Also:
Constant Field Values

NAME_OFFSET

static final java.lang.String NAME_OFFSET
See Also:
Constant Field Values

NAME_OPERATION

static final java.lang.String NAME_OPERATION
See Also:
Constant Field Values

NAME_OPERATIONS

static final java.lang.String NAME_OPERATIONS
See Also:
Constant Field Values

NAME_PARAMPATH

static final java.lang.String NAME_PARAMPATH
See Also:
Constant Field Values

NAME_PARAMQUERY

static final java.lang.String NAME_PARAMQUERY
See Also:
Constant Field Values

NAME_PASSWORD

static final java.lang.String NAME_PASSWORD
See Also:
Constant Field Values

NAME_PHASE

static final java.lang.String NAME_PHASE
See Also:
Constant Field Values

NAME_PLUGIN

static final java.lang.String NAME_PLUGIN
See Also:
Constant Field Values

NAME_PLUGINID

static final java.lang.String NAME_PLUGINID
See Also:
Constant Field Values

NAME_PLUGINS

static final java.lang.String NAME_PLUGINS
See Also:
Constant Field Values

NAME_POLICIES

static final java.lang.String NAME_POLICIES
See Also:
Constant Field Values

NAME_POLICY

static final java.lang.String NAME_POLICY
See Also:
Constant Field Values

NAME_POLICYID

static final java.lang.String NAME_POLICYID
See Also:
Constant Field Values

NAME_PRINCIPAL

static final java.lang.String NAME_PRINCIPAL
See Also:
Constant Field Values

NAME_PROPERTIES

static final java.lang.String NAME_PROPERTIES
See Also:
Constant Field Values

NAME_PROPERTY

static final java.lang.String NAME_PROPERTY
See Also:
Constant Field Values

NAME_QUANTITY

static final java.lang.String NAME_QUANTITY
See Also:
Constant Field Values

NAME_QUERY

static final java.lang.String NAME_QUERY
See Also:
Constant Field Values

NAME_QUESTIONS

static final java.lang.String NAME_QUESTIONS
See Also:
Constant Field Values

NAME_READONLY

static final java.lang.String NAME_READONLY
See Also:
Constant Field Values

NAME_RELATIONSHIP

static final java.lang.String NAME_RELATIONSHIP
See Also:
Constant Field Values

NAME_RELATIONSHIPID

static final java.lang.String NAME_RELATIONSHIPID
See Also:
Constant Field Values

NAME_RELATIONSHIPS

static final java.lang.String NAME_RELATIONSHIPS
See Also:
Constant Field Values

NAME_REQUEST

static final java.lang.String NAME_REQUEST
See Also:
Constant Field Values

NAME_REQUIRED

static final java.lang.String NAME_REQUIRED
See Also:
Constant Field Values

NAME_RESOURCE

static final java.lang.String NAME_RESOURCE
See Also:
Constant Field Values

NAME_RESOURCEID

static final java.lang.String NAME_RESOURCEID
See Also:
Constant Field Values

NAME_RESOURCES

static final java.lang.String NAME_RESOURCES
See Also:
Constant Field Values

NAME_RESPONSE

static final java.lang.String NAME_RESPONSE
See Also:
Constant Field Values

NAME_RESULTS

static final java.lang.String NAME_RESULTS
See Also:
Constant Field Values

NAME_SEARCH

static final java.lang.String NAME_SEARCH
See Also:
Constant Field Values

NAME_SECRET

static final java.lang.String NAME_SECRET
See Also:
Constant Field Values

NAME_SERVICE

static final java.lang.String NAME_SERVICE
See Also:
Constant Field Values

NAME_SESSION

static final java.lang.String NAME_SESSION
See Also:
Constant Field Values

NAME_SESSIONID

static final java.lang.String NAME_SESSIONID
See Also:
Constant Field Values

NAME_SESSIONINFO

static final java.lang.String NAME_SESSIONINFO
See Also:
Constant Field Values

NAME_SESSIONS

static final java.lang.String NAME_SESSIONS
See Also:
Constant Field Values

NAME_SIBLINGS

static final java.lang.String NAME_SIBLINGS
See Also:
Constant Field Values

NAME_SORT

static final java.lang.String NAME_SORT
See Also:
Constant Field Values

NAME_STAT

static final java.lang.String NAME_STAT
See Also:
Constant Field Values

NAME_STATE

static final java.lang.String NAME_STATE
See Also:
Constant Field Values

NAME_STATID

static final java.lang.String NAME_STATID
See Also:
Constant Field Values

NAME_STATS

static final java.lang.String NAME_STATS
See Also:
Constant Field Values

NAME_STATUS

static final java.lang.String NAME_STATUS
See Also:
Constant Field Values

NAME_STRUCTURE

static final java.lang.String NAME_STRUCTURE
See Also:
Constant Field Values

NAME_STRUCTURES

static final java.lang.String NAME_STRUCTURES
See Also:
Constant Field Values

NAME_SUBJECT

static final java.lang.String NAME_SUBJECT
See Also:
Constant Field Values

NAME_SUBJECTID

static final java.lang.String NAME_SUBJECTID
See Also:
Constant Field Values

NAME_SUBJECTS

static final java.lang.String NAME_SUBJECTS
See Also:
Constant Field Values

NAME_TARGET

static final java.lang.String NAME_TARGET
See Also:
Constant Field Values

NAME_TARGETID

static final java.lang.String NAME_TARGETID
See Also:
Constant Field Values

NAME_TARGETS

static final java.lang.String NAME_TARGETS
See Also:
Constant Field Values

NAME_TEMPLATE

static final java.lang.String NAME_TEMPLATE
See Also:
Constant Field Values

NAME_TO

static final java.lang.String NAME_TO
See Also:
Constant Field Values

NAME_TYPE

static final java.lang.String NAME_TYPE
See Also:
Constant Field Values

NAME_TYPES

static final java.lang.String NAME_TYPES
See Also:
Constant Field Values

NAME_UNIQUEID

static final java.lang.String NAME_UNIQUEID
See Also:
Constant Field Values

NAME_UPDATED

static final java.lang.String NAME_UPDATED
See Also:
Constant Field Values

NAME_URI

static final java.lang.String NAME_URI
See Also:
Constant Field Values

NAME_VALUE

static final java.lang.String NAME_VALUE
See Also:
Constant Field Values

NAME_VALUES

static final java.lang.String NAME_VALUES
See Also:
Constant Field Values

NAME_VERSION

static final java.lang.String NAME_VERSION
See Also:
Constant Field Values

NAME_VIEW

static final java.lang.String NAME_VIEW
See Also:
Constant Field Values

NAME_VIEWID

static final java.lang.String NAME_VIEWID
See Also:
Constant Field Values

NAME_VIEWS

static final java.lang.String NAME_VIEWS
See Also:
Constant Field Values

NAME_VIRTUAL

static final java.lang.String NAME_VIRTUAL
See Also:
Constant Field Values
Method Detail

addChild

void addChild(StructureIF struct)
              throws StructureException
Adds the provided Structure as a Child. Will throw an StructureException if:

Parameters:
struct - Child Structure
Throws:
StructureException

addValue

void addValue(boolean value)
              throws StructureException
Add boolean to the Structure's value. Will throw an StructureException if:

Parameters:
value - boolean to add
Throws:
StructureException

addValue

void addValue(java.lang.Boolean value)
              throws StructureException
Add Boolean to the Structure's value. Will throw an StructureException if:

Parameters:
value - Boolean to add
Throws:
StructureException

addValue

void addValue(int value)
              throws StructureException
Add integer to the Structure's value. Will throw an StructureException if:

Parameters:
value - integer to add
Throws:
StructureException

addValue

void addValue(java.lang.Integer value)
              throws StructureException
Add Integer to the Structure's value. Will throw an StructureException if:

Parameters:
value - Integer to add
Throws:
StructureException

addValue

void addValue(long value)
              throws StructureException
Add long to the Structure value. Will throw an StructureException if:

Parameters:
value - long to add
Throws:
StructureException

addValue

void addValue(java.lang.Long value)
              throws StructureException
Add Long to the Structure value. Will throw an StructureException if:

Parameters:
value - Long to add
Throws:
StructureException

addValue

void addValue(java.lang.Object value)
              throws StructureException
Add Object to the Structure's value. Will throw an StructureException if:

Parameters:
value - Object to add
Throws:
StructureException

addValue

void addValue(java.lang.String value)
              throws StructureException
Add String to the Structure's value. Will throw an StructureException if:

Parameters:
value - String to add
Throws:
StructureException

getChild

StructureIF getChild(java.lang.String name)
Returns the specified Child Structure. If the Child does not exist, the returned Structure is null.

Parameters:
name - Child Structure's name
Returns:
StructureIF the Child

getChildren

java.util.List<StructureIF> getChildren()
Returns all Child Structures as a List. The List is ordered (order of insertion).

Returns:
List Child Structures.

getChildren

java.util.List<StructureIF> getChildren(java.lang.String name)
Returns a List (of Children) that match the provided name. All of the Child Structures are search, those that match the provided name will be returned in a List.

Parameters:
name - The child name
Returns:
List of matching children

getChildrenAsArray

StructureIF[] getChildrenAsArray()
Returns all Child Structures as an Array. The Array is ordered (order of insertion).

Returns:
StructureIF[] Child Structures.

getChildrenAsArray

StructureIF[] getChildrenAsArray(java.lang.String name)
Returns an Structure array (of Children) that match the provided name. All of the Child Structures are search, those that match the provided name will be returned in an array.

Parameters:
name - The child name
Returns:
StructureIF[] Array of matching children

getChildrenIds

java.lang.String[] getChildrenIds()
Returns a String Array containing the Childrens id (name). The Array is ordered (order of insertion).

Returns:
String[] Child ids (names)

getName

java.lang.String getName()
Get the Structure's name.

Returns:
String The Structure's name

getParent

StructureIF getParent()
Returns the Structure's Parent (if it is a Child). This will be null if it is not a Child.

Returns:
StructureIF Parent Structure

getState

State getState()
Get the Structure's State.

Returns:
State the current state

getValue

java.lang.Object getValue()
Returns the value (if single valued) or the first value (is multi valued) If there is no value, null will be returned.

Returns:
Object the (first) value

getValueAsString

java.lang.String getValueAsString()
Returns a String representation of the (first) value.

Returns:
String representation of the (first) value

getValues

java.util.List<java.lang.Object> getValues()
Returns the List of values (Object). An ordered list (order of insertion) of values. Use the getValueType() method to determine the value's real type. All values will be of the same type.

Returns:
List ordered list of values

getValuesAsArray

java.lang.Object[] getValuesAsArray()
Returns an Array of values (Object). An ordered array (order of insertion) of values. Use the getValueType() method to determine the value's real type. All values will be of the same type.

Returns:
Object[] ordered array of values

getValuesAsString

java.lang.String getValuesAsString()
Returns a String representation of all (List) the values.

Returns:
String representation of all (List) the values.

getValueType

StructureType getValueType()
Returns the Structure's Type.

Returns:
StructureType Structure's Type

hasChild

boolean hasChild(java.lang.String name)
Returns TRUE if a Child exists with the specified name.

Parameters:
name - Child Structure name
Returns:
boolean TRUE if has children

hasChildren

boolean hasChildren()
Returns TRUE if the Structure contains one or more Children.

Returns:
boolean contains child(ren)

isMultiValued

boolean isMultiValued()
Returns TRUE if the Structure contains more than 1 (one) value.

Returns:
boolean True if more than 1 value

setChild

void setChild(int index,
              StructureIF child)
              throws StructureException
Sets / Replaces a specific Child with the provided Structure. Will throw an StructureException if:

Parameters:
index - child offset
child - Child Structure
Throws:
StructureException

setName

void setName(java.lang.String name)
Set the Structure's name.

Parameters:
name - Structure's name

setParent

void setParent(StructureIF struct)
Set the Structure's parent.

Note: In most situation this method should not be used / needed. The Child/Parent relationship is maintained by the addChild() and setChild() methods.

Parameters:
struct - Parent Structure

setState

void setState(State state)
Set the Structure's State.

Parameters:
state - A valid State


View/submit a bug or feature

For further API reference and developer documentation, see www.openptk.org. That documentation contains more detailed, developer-targeted descriptions, definitions of terms, workarounds, and working code examples.

Copyright (C) 2008-2012, Project OpenPTK. All Rights Reserved