org.apache.slide.content
Class NodeProperty

java.lang.Object
  extended byorg.apache.slide.content.NodeProperty
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public final class NodeProperty
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

Node property class

Version:
$Revision: 1.29 $
See Also:
Serialized Form

Nested Class Summary
static class NodeProperty.Kind
          The kind of a property: dead, live, protected, computed
static class NodeProperty.NamespaceCache
          The usage of this class avoids the creation of mutliple Namespace objects with the same URI but different prefix.
 
Field Summary
static java.util.Set allComputedProperties
          The standard computed properties.
static java.util.Set allLiveProperties
          The standard live properties.
static java.util.Set allProtectedProperties
          The standard protected properties.
static java.lang.String DEFAULT_NAMESPACE
           
protected static java.lang.String I_STANDARDLIVEPROPERTIESCLASS
           
protected static java.lang.String I_STANDARDLIVEPROPERTIESCLASS_DEFAULT
           
static java.lang.String SLIDE_NAMESPACE
           
 
Constructor Summary
NodeProperty(PropertyName name, java.lang.Object value)
           
NodeProperty(PropertyName name, java.lang.Object value, boolean protectedProperty)
           
NodeProperty(java.lang.String name, java.lang.Object value)
          Constructor.
NodeProperty(java.lang.String name, java.lang.Object value, boolean protectedProperty)
          Constructor.
NodeProperty(java.lang.String name, java.lang.Object value, java.lang.String namespace)
          Constructor.
NodeProperty(java.lang.String name, java.lang.Object value, java.lang.String namespace, boolean protectedProperty)
           
NodeProperty(java.lang.String name, java.lang.Object value, java.lang.String namespace, java.lang.String type)
          Constructor.
NodeProperty(java.lang.String name, java.lang.Object value, java.lang.String namespace, java.lang.String type, boolean protectedProperty)
          Constructor.
 
Method Summary
 void addPermission(NodePermission permission)
          Add permission.
(package private)  NodeProperty cloneObject()
          Clone.
 java.util.Enumeration enumeratePermissions()
          Enumerate permissions.
 boolean equals(java.lang.Object obj)
          Equals.
 NodeProperty.Kind getKind()
          Kind accessor.
 java.lang.String getName()
          Property name accessor.
 java.lang.String getNamespace()
          Namespace accessor.
 PropertyName getPropertyName()
          Returnd the property name object.
 java.lang.String getType()
          Type accessor.
 java.lang.Object getValue()
          Value accessor.
 int hashCode()
          Hash Code.
 boolean isComputed()
          Kind accessor.
 boolean isDeadProperty()
          Kind accessor.
 boolean isLiveProperty()
          Kind accessor.
 boolean isProtected()
          Kind accessor.
 void removePermission(NodePermission permission)
          Remove permission.
 void setKind(NodeProperty.Kind kind)
          Deprecated. use apropriate ctor
 java.lang.String toString()
          String representation of the permission.
 void validate()
          Validate.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_NAMESPACE

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

SLIDE_NAMESPACE

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

I_STANDARDLIVEPROPERTIESCLASS

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

I_STANDARDLIVEPROPERTIESCLASS_DEFAULT

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

allLiveProperties

public static java.util.Set allLiveProperties
The standard live properties.


allProtectedProperties

public static java.util.Set allProtectedProperties
The standard protected properties.


allComputedProperties

public static java.util.Set allComputedProperties
The standard computed properties.

Constructor Detail

NodeProperty

public NodeProperty(java.lang.String name,
                    java.lang.Object value)
Constructor.

Parameters:
name - Name
value - Value

NodeProperty

public NodeProperty(java.lang.String name,
                    java.lang.Object value,
                    java.lang.String namespace)
Constructor.

Parameters:
name - Name
value - Value
namespace - Namespace

NodeProperty

public NodeProperty(PropertyName name,
                    java.lang.Object value)

NodeProperty

public NodeProperty(java.lang.String name,
                    java.lang.Object value,
                    java.lang.String namespace,
                    java.lang.String type)
Constructor.

Parameters:
name - Name
value - Value
namespace - Namespace
type - the type

NodeProperty

public NodeProperty(java.lang.String name,
                    java.lang.Object value,
                    boolean protectedProperty)
Constructor.

Parameters:
name - Name
value - Value
protectedProperty - Is the property protected?

NodeProperty

public NodeProperty(java.lang.String name,
                    java.lang.Object value,
                    java.lang.String namespace,
                    boolean protectedProperty)

NodeProperty

public NodeProperty(PropertyName name,
                    java.lang.Object value,
                    boolean protectedProperty)

NodeProperty

public NodeProperty(java.lang.String name,
                    java.lang.Object value,
                    java.lang.String namespace,
                    java.lang.String type,
                    boolean protectedProperty)
Constructor.

Parameters:
name - Name
value - Value
namespace - Namespace
type - Type info
protectedProperty - Protected property
Method Detail

isDeadProperty

public boolean isDeadProperty()
Kind accessor.

Returns:
true, if this is a dead property

isComputed

public boolean isComputed()
Kind accessor.

Returns:
true, if this is a computed (live) property

isProtected

public boolean isProtected()
Kind accessor.

Returns:
true, if this is a protected (live) property

isLiveProperty

public boolean isLiveProperty()
Kind accessor.

Returns:
true, if this is a live property

getName

public java.lang.String getName()
Property name accessor.

Returns:
String property name

getNamespace

public java.lang.String getNamespace()
Namespace accessor.

Returns:
String definition

getPropertyName

public PropertyName getPropertyName()
Returnd the property name object.


getValue

public java.lang.Object getValue()
Value accessor.

Returns:
Object value

getType

public java.lang.String getType()
Type accessor.

Returns:
String type

getKind

public NodeProperty.Kind getKind()
Kind accessor.

Returns:
the property kind (dead, live, protected, computed)

setKind

public void setKind(NodeProperty.Kind kind)
Deprecated. use apropriate ctor

Kind mutator.

Parameters:
kind - the kind

addPermission

public void addPermission(NodePermission permission)
Add permission.

Parameters:
permission - Permission

removePermission

public void removePermission(NodePermission permission)
Remove permission.

Parameters:
permission - Permission to remove

enumeratePermissions

public java.util.Enumeration enumeratePermissions()
Enumerate permissions.

Returns:
Enumeration permissions

cloneObject

NodeProperty cloneObject()
Clone.

Returns:
Object clone

hashCode

public int hashCode()
Hash Code.

Returns:
int Hash code value

toString

public java.lang.String toString()
String representation of the permission.

Format : ObjectUri-SubjectUri-ActionUri-InheritanceFlag

Returns:
String String representation

equals

public boolean equals(java.lang.Object obj)
Equals.

Parameters:
obj - Object to test
Returns:
boolean True if the two object are equal :
  • obj is of type NodeProperty and is not null
  • The property names are equal

  • validate

    public void validate()
    Validate.