org.palo.api
Interface Property2

All Superinterfaces:
NamedEntity, PaloObject, Writable
All Known Implementing Classes:
Property2Impl

public interface Property2
extends PaloObject

Propery2

Property2 objects can be added to PaloObjects in order to attribute additional information to them.

For example, an SAP XMLA connection has the notion of "variables", a feature unknown to other XMLA connection. Thus, all variables belonging to a cube are stored as properties for that cube and can be modified by the client.

Properties can also be used to add client specific knowledge to PaloObjects.


Field Summary
static int TYPE_BOOLEAN
          Property types.
static int TYPE_NUMERIC
          Property types.
static int TYPE_STRING
          Property types.
 
Fields inherited from interface org.palo.api.PaloObject
TYPE_ATTRIBUTE, TYPE_NORMAL, TYPE_SYSTEM, TYPE_USER_INFO
 
Method Summary
 void addChild(Property2 child)
          Adds a new child to this property.
 void clearChildren()
          Clears all children of this property.
 int getChildCount()
          Returns the number of children of this property.
 Property2[] getChildren()
          Returns all child properties of this property.
 Property2[] getChildren(java.lang.String childId)
          Returns all child properties with the specified id.
 java.lang.String getChildValue(java.lang.String childId)
          Returns the value for the first child with the specified id or an empty string no such child exists.
 Property2 getParent()
          Returns the parent of this property or null if no parent exists.
 int getType()
          Returns the type of this property.
 java.lang.String getValue()
          Returns the string representation of this property's value.
 boolean isReadOnly()
          Returns true if this property cannot be modified.
 void removeChild(Property2 child)
          Removes a given child from this property.
 void setValue(java.lang.String newValue)
          Sets the new value for this property.
 
Methods inherited from interface org.palo.api.PaloObject
getId
 
Methods inherited from interface org.palo.api.NamedEntity
getName
 
Methods inherited from interface org.palo.api.Writable
canBeModified, canCreateChildren
 

Field Detail

TYPE_NUMERIC

static final int TYPE_NUMERIC
Property types. A property can either be a numeric value, a string value or a boolean flag.

See Also:
Constant Field Values

TYPE_STRING

static final int TYPE_STRING
Property types. A property can either be a numeric value, a string value or a boolean flag.

See Also:
Constant Field Values

TYPE_BOOLEAN

static final int TYPE_BOOLEAN
Property types. A property can either be a numeric value, a string value or a boolean flag.

See Also:
Constant Field Values
Method Detail

getValue

java.lang.String getValue()
Returns the string representation of this property's value. If the type of this property is either numeric or boolean, the string representation can be parsed to a double or a boolean, respectively.

Returns:
the string representation of this property's value.

setValue

void setValue(java.lang.String newValue)
Sets the new value for this property.

Parameters:
newValue - a new value for this property.

getParent

Property2 getParent()
Returns the parent of this property or null if no parent exists.

Returns:
the parent of this property.

getChildCount

int getChildCount()
Returns the number of children of this property.

Returns:
the number of children of this property.

getChildren

Property2[] getChildren()
Returns all child properties of this property.

Returns:
all child properties of this property.

getChildValue

java.lang.String getChildValue(java.lang.String childId)
Returns the value for the first child with the specified id or an empty string no such child exists.

Parameters:
childId - the id of the child property.
Returns:
the value of the first child property with the specified id or an empty string if no child with this id exists.

getChildren

Property2[] getChildren(java.lang.String childId)
Returns all child properties with the specified id.

Parameters:
childId - the id of the child properties which should be returned.
Returns:
all child properties with the given id.

addChild

void addChild(Property2 child)
Adds a new child to this property.

Parameters:
child - the property to add to this property.

removeChild

void removeChild(Property2 child)
Removes a given child from this property.

Parameters:
child -

clearChildren

void clearChildren()
Clears all children of this property.


isReadOnly

boolean isReadOnly()
Returns true if this property cannot be modified.

Returns:
true if this property cannot be modified, false otherwise.

getType

int getType()
Returns the type of this property.

Specified by:
getType in interface PaloObject
Returns:
the type of this property as defined in the constants in this interface.