Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.obinary.cms.core
Class Atom  view Atom download Atom.java

java.lang.Object
  extended bycom.obinary.cms.core.Atom

public class Atom
extends java.lang.Object

User: sameercharles Date: Apr 28, 2003 Time: 11:20:59 AM

Version:
1.0

Field Summary
static java.lang.String HTML_LINEBREAK
           
private  Property property
           
private  java.lang.String value
           
 
Constructor Summary
(package private) Atom()
          package private constructor
  Atom(Node workingNode, java.lang.String name)
          constructor | create atom object to work-on based on existing Atom
  Atom(Node workingNode, java.lang.String name, boolean createNew)
          constructor | creates a new initialized Atom of default yype String
  Atom(Node workingNode, java.lang.String name, Value value, int type)
          constructor | creates a new initialized Atom
  Atom(Property prop)
          constructor | creates a new initialized Atom
 
Method Summary
 boolean getBoolean()
          Returns the boolean representation of the value:
 int getContentLength()
           NOT AVAILABLE, always returns 0
 java.util.Calendar getDate()
          Returns the Calendar representation of the value:
 double getDouble()
          Returns the double representation of the value:
 Property getJCRProperty()
          Access to property at the JCR level.
 long getLong()
          Returns the long representation of the value:
 java.lang.String getName()
           
 java.lang.String getString()
          Returns the String representation of the value:
 java.lang.String getString(java.lang.String lineBreak)
          Returns the String representation of the value:
decodes like breaks with the specified regular expresion
 int getType()
          Returns the type of this Atom.
 Value getValue()
          Returns the value of this Atom.
 boolean isExist()
          checks if the atom exists in the repository
 void setValue(boolean value)
          set value of type boolean
 void setValue(java.util.Calendar value)
          set value of type Calendar
 void setValue(double value)
          set value of type double
 void setValue(java.io.InputStream value)
          set value of type InputStream
 void setValue(int value)
          set value of type int
 void setValue(long value)
          set value of type long
 void setValue(java.lang.String value)
          set value of type String
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HTML_LINEBREAK

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

value

private java.lang.String value

property

private Property property
Constructor Detail

Atom

Atom()
package private constructor


Atom

public Atom(Node workingNode,
            java.lang.String name)
     throws ElementNotFoundException,
            RepositoryException

constructor | create atom object to work-on based on existing Atom


Atom

public Atom(Node workingNode,
            java.lang.String name,
            boolean createNew)
     throws ElementNotFoundException,
            RepositoryException

constructor | creates a new initialized Atom of default yype String


Atom

public Atom(Node workingNode,
            java.lang.String name,
            Value value,
            int type)
     throws ElementNotFoundException,
            RepositoryException

constructor | creates a new initialized Atom


Atom

public Atom(Property prop)
     throws ElementNotFoundException,
            RepositoryException

constructor | creates a new initialized Atom

Method Detail

getValue

public Value getValue()

Returns the value of this Atom. One of type:

  • PropertyType.STRING
  • PropertyType.DATE
  • PropertyType.SOFTLINK
  • PropertyType.BINARY
  • PropertyType.DOUBLE
  • PropertyType.LONG
  • PropertyType.BOOLEAN


getString

public java.lang.String getString(java.lang.String lineBreak)

Returns the String representation of the value:
decodes like breaks with the specified regular expresion


getString

public java.lang.String getString()

Returns the String representation of the value:


getLong

public long getLong()

Returns the long representation of the value:


getDouble

public double getDouble()

Returns the double representation of the value:


getDate

public java.util.Calendar getDate()

Returns the Calendar representation of the value:


getBoolean

public boolean getBoolean()

Returns the boolean representation of the value:


getType

public int getType()

Returns the type of this Atom. One of:

  • PropertyType.STRING
  • PropertyType.DATE
  • PropertyType.SOFTLINK
  • PropertyType.BINARY
  • PropertyType.DOUBLE
  • PropertyType.LONG
  • PropertyType.BOOLEAN


getName

public java.lang.String getName()

getContentLength

public int getContentLength()

NOT AVAILABLE, always returns 0


getJCRProperty

public Property getJCRProperty()

Access to property at the JCR level.
available only to be available, should not be used in normal circunstances!


setValue

public void setValue(java.lang.String value)
              throws RepositoryException

set value of type String


setValue

public void setValue(int value)
              throws RepositoryException

set value of type int


setValue

public void setValue(long value)
              throws RepositoryException

set value of type long


setValue

public void setValue(java.io.InputStream value)
              throws RepositoryException

set value of type InputStream


setValue

public void setValue(double value)
              throws RepositoryException

set value of type double


setValue

public void setValue(boolean value)
              throws RepositoryException

set value of type boolean


setValue

public void setValue(java.util.Calendar value)
              throws RepositoryException

set value of type Calendar


isExist

public boolean isExist()

checks if the atom exists in the repository