dbXML API

com.dbxml.db.client
Interface ContentClient

All Known Implementing Classes:
ContentClientImpl, ContentClientImpl

public interface ContentClient

ContentClient is the standard interface for objects that are stored in a Collection. A ContentClient can either represent a Document or a Value, depending on the Collection type.


Field Summary
static int TYPE_DOCUMENT
           
static int TYPE_VALUE
           
 
Method Summary
 java.lang.String getCanonicalName()
          getCanonicalName returns the canonical path for the Content.
 CollectionClient getCollection()
          getCollection returns the CollectionClient that this ContentClientImpl belongs to.
 int getContentType()
          getContainerType returns the content type for this client.
 org.w3c.dom.Document getDocument()
          getDocument returns the Document Content as a DOM Document.
 java.lang.String getDocumentAsText()
          getDocumentAsText returns the Document Content as text.
 java.lang.String getKey()
          getKey returns the Content Key.
 byte[] getValue()
          getValue returns the Value Content as a byte array.
 void setDocument(org.w3c.dom.Document document)
          setDocument sets or overwrites the Document Content.
 void setDocumentAsText(java.lang.String document)
          setDocumentAsText sets or overwrites the Document Content.
 void setValue(byte[] value)
          setValue sets or overwrites the Value Content.
 

Field Detail

TYPE_DOCUMENT

public static final int TYPE_DOCUMENT
See Also:
Constant Field Values

TYPE_VALUE

public static final int TYPE_VALUE
See Also:
Constant Field Values
Method Detail

getKey

public java.lang.String getKey()
                        throws dbXMLException
getKey returns the Content Key.

Returns:
The Content Key
Throws:
dbXMLException

getContentType

public int getContentType()
                   throws dbXMLException
getContainerType returns the content type for this client. This value can either be TYPE_DOCUMENT or TYPE_VALUE.

Returns:
The content type
Throws:
dbXMLException

getCanonicalName

public java.lang.String getCanonicalName()
                                  throws dbXMLException
getCanonicalName returns the canonical path for the Content.

Returns:
The canonical path
Throws:
dbXMLException

getCollection

public CollectionClient getCollection()
                               throws dbXMLException
getCollection returns the CollectionClient that this ContentClientImpl belongs to.

Returns:
The CollectionClient
Throws:
dbXMLException

getDocument

public org.w3c.dom.Document getDocument()
                                 throws dbXMLException
getDocument returns the Document Content as a DOM Document.

Returns:
The Document content
Throws:
dbXMLException

getDocumentAsText

public java.lang.String getDocumentAsText()
                                   throws dbXMLException
getDocumentAsText returns the Document Content as text.

Returns:
The Document content
Throws:
dbXMLException

getValue

public byte[] getValue()
                throws dbXMLException
getValue returns the Value Content as a byte array.

Returns:
The Value content
Throws:
dbXMLException

setDocument

public void setDocument(org.w3c.dom.Document document)
                 throws dbXMLException
setDocument sets or overwrites the Document Content.

Parameters:
document - The new Document content
Throws:
dbXMLException

setDocumentAsText

public void setDocumentAsText(java.lang.String document)
                       throws dbXMLException
setDocumentAsText sets or overwrites the Document Content.

Parameters:
document - The new Document content
Throws:
dbXMLException

setValue

public void setValue(byte[] value)
              throws dbXMLException
setValue sets or overwrites the Value Content.

Parameters:
value - The new Value content
Throws:
dbXMLException

dbXML API

Copyright (c) 2004 The dbXML Group