org.apache.jackrabbit.base
Class BaseProperty

java.lang.Object
  extended byorg.apache.jackrabbit.base.BaseItem
      extended byorg.apache.jackrabbit.base.BaseProperty
All Implemented Interfaces:
Item, Property

public class BaseProperty
extends BaseItem
implements Property

Property base class.


Constructor Summary
protected BaseProperty()
          Protected constructor.
 
Method Summary
 void accept(ItemVisitor visitor)
          Implemented by calling visitor.visit(this).
 boolean getBoolean()
          Implemented by calling getValue().getBoolean().
 Calendar getDate()
          Implemented by calling getValue().getDate().
 PropertyDefinition getDefinition()
          Not implemented.
 double getDouble()
          Implemented by calling getValue().getDouble().
 long getLength()
          Implemented by calling getType() and returning -1 if type is binary or getString().length() otherwise.
 long[] getLengths()
          
 long getLong()
          Implemented by calling getValue().getLong().
 Node getNode()
          Implemented by calling getSession().getNodeByUUID(getString()).
 InputStream getStream()
          Implemented by calling getValue().getStream().
 String getString()
          Implemented by calling getValue().getString().
 int getType()
          Implemented by calling getValue().getType().
 Value getValue()
          Not implemented.
 Value[] getValues()
          Not implemented.
 boolean isNode()
          Always returns false.
 void setValue(boolean value)
          Implemented by calling setValue(getSession().getValueFactory().createValue(value)).
 void setValue(Calendar value)
          Implemented by calling setValue(getSession().getValueFactory().createValue(value)).
 void setValue(double value)
          Implemented by calling setValue(getSession().getValueFactory().createValue(value)).
 void setValue(InputStream value)
          Implemented by calling setValue(getSession().getValueFactory().createValue(value)).
 void setValue(long value)
          Implemented by calling setValue(getSession().getValueFactory().createValue(value)).
 void setValue(Node value)
          Implemented by calling setValue(getSession().getValueFactory().createValue(value)).
 void setValue(String value)
          Implemented by calling setValue(getSession().getValueFactory().createValue(value)).
 void setValue(String[] values)
          Implemented by calling setValue(stringValues) with an array of Values that were created from the given strings by getSession().getValueFactory().createValue(values[i])).
 void setValue(Value value)
          Not implemented.
 void setValue(Value[] values)
          Not implemented.
 
Methods inherited from class org.apache.jackrabbit.base.BaseItem
getAncestor, getDepth, getName, getParent, getPath, getSession, isModified, isNew, isSame, refresh, remove, save
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.jcr.Item
getAncestor, getDepth, getName, getParent, getPath, getSession, isModified, isNew, isSame, refresh, remove, save
 

Constructor Detail

BaseProperty

protected BaseProperty()
Protected constructor. This class is only useful when extended.

Method Detail

accept

public void accept(ItemVisitor visitor)
            throws RepositoryException
Implemented by calling visitor.visit(this). Does nothing.

Specified by:
accept in interface Item
Overrides:
accept in class BaseItem
Throws:
RepositoryException

isNode

public boolean isNode()
Always returns false. Always returns false.

Specified by:
isNode in interface Item
Overrides:
isNode in class BaseItem

setValue

public void setValue(Value value)
              throws ValueFormatException,
                     VersionException,
                     LockException,
                     RepositoryException
Not implemented.

Specified by:
setValue in interface Property
Throws:
ValueFormatException
VersionException
LockException
RepositoryException

setValue

public void setValue(Value[] values)
              throws ValueFormatException,
                     VersionException,
                     LockException,
                     RepositoryException
Not implemented.

Specified by:
setValue in interface Property
Throws:
ValueFormatException
VersionException
LockException
RepositoryException

setValue

public void setValue(String value)
              throws ValueFormatException,
                     VersionException,
                     LockException,
                     RepositoryException
Implemented by calling setValue(getSession().getValueFactory().createValue(value)).

Specified by:
setValue in interface Property
Throws:
ValueFormatException
VersionException
LockException
RepositoryException

setValue

public void setValue(String[] values)
              throws ValueFormatException,
                     VersionException,
                     LockException,
                     RepositoryException
Implemented by calling setValue(stringValues) with an array of Values that were created from the given strings by getSession().getValueFactory().createValue(values[i])).

Specified by:
setValue in interface Property
Throws:
ValueFormatException
VersionException
LockException
RepositoryException

setValue

public void setValue(InputStream value)
              throws ValueFormatException,
                     VersionException,
                     LockException,
                     RepositoryException
Implemented by calling setValue(getSession().getValueFactory().createValue(value)).

Specified by:
setValue in interface Property
Throws:
ValueFormatException
VersionException
LockException
RepositoryException

setValue

public void setValue(long value)
              throws ValueFormatException,
                     VersionException,
                     LockException,
                     RepositoryException
Implemented by calling setValue(getSession().getValueFactory().createValue(value)).

Specified by:
setValue in interface Property
Throws:
ValueFormatException
VersionException
LockException
RepositoryException

setValue

public void setValue(double value)
              throws ValueFormatException,
                     VersionException,
                     LockException,
                     RepositoryException
Implemented by calling setValue(getSession().getValueFactory().createValue(value)).

Specified by:
setValue in interface Property
Throws:
ValueFormatException
VersionException
LockException
RepositoryException

setValue

public void setValue(Calendar value)
              throws ValueFormatException,
                     VersionException,
                     LockException,
                     RepositoryException
Implemented by calling setValue(getSession().getValueFactory().createValue(value)).

Specified by:
setValue in interface Property
Throws:
ValueFormatException
VersionException
LockException
RepositoryException

setValue

public void setValue(boolean value)
              throws ValueFormatException,
                     VersionException,
                     LockException,
                     RepositoryException
Implemented by calling setValue(getSession().getValueFactory().createValue(value)).

Specified by:
setValue in interface Property
Throws:
ValueFormatException
VersionException
LockException
RepositoryException

setValue

public void setValue(Node value)
              throws ValueFormatException,
                     VersionException,
                     LockException,
                     RepositoryException
Implemented by calling setValue(getSession().getValueFactory().createValue(value)).

Specified by:
setValue in interface Property
Throws:
ValueFormatException
VersionException
LockException
RepositoryException

getValue

public Value getValue()
               throws ValueFormatException,
                      RepositoryException
Not implemented.

Specified by:
getValue in interface Property
Throws:
ValueFormatException
RepositoryException

getValues

public Value[] getValues()
                  throws ValueFormatException,
                         RepositoryException
Not implemented.

Specified by:
getValues in interface Property
Throws:
ValueFormatException
RepositoryException

getString

public String getString()
                 throws ValueFormatException,
                        RepositoryException
Implemented by calling getValue().getString().

Specified by:
getString in interface Property
Throws:
ValueFormatException
RepositoryException

getStream

public InputStream getStream()
                      throws ValueFormatException,
                             RepositoryException
Implemented by calling getValue().getStream().

Specified by:
getStream in interface Property
Throws:
ValueFormatException
RepositoryException

getLong

public long getLong()
             throws ValueFormatException,
                    RepositoryException
Implemented by calling getValue().getLong().

Specified by:
getLong in interface Property
Throws:
ValueFormatException
RepositoryException

getDouble

public double getDouble()
                 throws ValueFormatException,
                        RepositoryException
Implemented by calling getValue().getDouble().

Specified by:
getDouble in interface Property
Throws:
ValueFormatException
RepositoryException

getDate

public Calendar getDate()
                 throws ValueFormatException,
                        RepositoryException
Implemented by calling getValue().getDate().

Specified by:
getDate in interface Property
Throws:
ValueFormatException
RepositoryException

getBoolean

public boolean getBoolean()
                   throws ValueFormatException,
                          RepositoryException
Implemented by calling getValue().getBoolean().

Specified by:
getBoolean in interface Property
Throws:
ValueFormatException
RepositoryException

getNode

public Node getNode()
             throws ValueFormatException,
                    RepositoryException
Implemented by calling getSession().getNodeByUUID(getString()).

Specified by:
getNode in interface Property
Throws:
ValueFormatException
RepositoryException

getLength

public long getLength()
               throws ValueFormatException,
                      RepositoryException
Implemented by calling getType() and returning -1 if type is binary or getString().length() otherwise.

Specified by:
getLength in interface Property
Throws:
ValueFormatException
RepositoryException

getLengths

public long[] getLengths()
                  throws ValueFormatException,
                         RepositoryException

Specified by:
getLengths in interface Property
Throws:
ValueFormatException
RepositoryException

getDefinition

public PropertyDefinition getDefinition()
                                 throws RepositoryException
Not implemented.

Specified by:
getDefinition in interface Property
Throws:
RepositoryException

getType

public int getType()
            throws RepositoryException
Implemented by calling getValue().getType().

Specified by:
getType in interface Property
Throws:
RepositoryException


Copyright © 2004-2005 . All Rights Reserved.