|
Xindice API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.xindice.client.xmldb.resources.XMLResourceImpl
XMLResourceImpl provides an implementation to handle XML resources and convert easily between Text, DOM or SAX presentations.
Note: SAX is not yet implemented.
Fields inherited from interface org.xmldb.api.modules.XMLResource |
RESOURCE_TYPE |
Constructor Summary | |
XMLResourceImpl(java.lang.String id,
Collection collection)
Constructor for the XMLResourceImpl object |
|
XMLResourceImpl(java.lang.String id,
Collection collection,
java.lang.String content)
Constructor for the XMLResourceImpl object |
|
XMLResourceImpl(java.lang.String id,
Collection collection,
SymbolTable syms,
byte[] bytes)
Constructor for the XMLResourceImpl object used in conjunction with Wire Compression |
|
XMLResourceImpl(java.lang.String id,
java.lang.String documentId,
Collection collection)
Constructor for the XMLResourceImpl object |
|
XMLResourceImpl(java.lang.String id,
java.lang.String documentId,
Collection collection,
java.lang.String content)
Constructor for the XMLResourceImpl object |
|
XMLResourceImpl(java.lang.String id,
java.lang.String documentId,
Collection collection,
SymbolTable syms,
byte[] bytes)
Constructor for the XMLResourceImpl object used in conjunction with Wire Compression |
Method Summary | |
java.lang.Object |
getContent()
Gets the content of the XMLResourceImpl object |
org.w3c.dom.Node |
getContentAsDOM()
Returns the content of the resource as a DOM Node. |
void |
getContentAsSAX(org.xml.sax.ContentHandler handler)
getContentAsSAX enables retrieving of the content via the use of a SAX ContentHandler. |
java.lang.String |
getDocumentId()
Returns the unique id for the parent document to this Resource
or null if the Resource does not have a parent document. |
java.lang.String |
getId()
Gets the Id attribute of the XMLResourceImpl object |
Collection |
getParentCollection()
Gets the parent Collection instance for this resource |
java.lang.String |
getResourceType()
Returns the resource type for this Resource. |
void |
setContent(java.lang.Object value)
Sets the Content attribute of the XMLResourceImpl object. |
void |
setContentAsDOM(org.w3c.dom.Node content)
Sets the content of the resource from a DOM Node. |
org.xml.sax.ContentHandler |
setContentAsSAX()
setContentAsSAX returns a SAX ContentHandler that can be used to set the content of the resource. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public XMLResourceImpl(java.lang.String id, Collection collection)
id
- The unique id associated with this resourcecollection
- the parent collection for the resourcepublic XMLResourceImpl(java.lang.String id, java.lang.String documentId, Collection collection)
id
- The unique id associated with this resourcedocumentId
- The parent document id associated with this resourcecollection
- the parent collection for the resourcepublic XMLResourceImpl(java.lang.String id, Collection collection, java.lang.String content)
id
- The unique id associated with this resourcecollection
- the parent collection for the resourcecontent
- the content to associate with the resourcepublic XMLResourceImpl(java.lang.String id, java.lang.String documentId, Collection collection, java.lang.String content)
id
- The unique id associated with this resourcedocumentId
- The parent document id associated with this resourcecollection
- the parent collection for the resourcecontent
- the content to associate with the resourcepublic XMLResourceImpl(java.lang.String id, java.lang.String documentId, Collection collection, SymbolTable syms, byte[] bytes)
id
- The unique id associated with this resourcecollection
- the parent collection for the resourcebytes
- the content to associate with the resourcepublic XMLResourceImpl(java.lang.String id, Collection collection, SymbolTable syms, byte[] bytes)
id
- The unique id associated with this resourcecollection
- the parent collection for the resourcebytes
- the content to associate with the resourceMethod Detail |
public java.lang.String getDocumentId() throws XMLDBException
Resource
or null if the Resource
does not have a parent document.getDocumentId
in interface XMLResource
Resource
or
null if there is no parent document for this Resource
.XMLDBException
- public void setContent(java.lang.Object value) throws XMLDBException
setContent
in interface Resource
value
- The new Content valueXMLDBException
- public void setContentAsDOM(org.w3c.dom.Node content) throws XMLDBException
setContentAsDOM
in interface XMLResource
content
- Node containing the new content.XMLDBException
- public org.xml.sax.ContentHandler setContentAsSAX() throws XMLDBException
setContentAsSAX
in interface XMLResource
XMLDBException
- public Collection getParentCollection() throws XMLDBException
getParentCollection
in interface Resource
XMLDBException
- public java.lang.String getResourceType() throws XMLDBException
getResourceType
in interface Resource
XMLDBException
- public java.lang.String getId() throws XMLDBException
getId
in interface Resource
XMLDBException
- public java.lang.Object getContent() throws XMLDBException
getContent
in interface Resource
XMLDBException
- public org.w3c.dom.Node getContentAsDOM() throws XMLDBException
getContentAsDOM
in interface XMLResource
XMLDBException
- public void getContentAsSAX(org.xml.sax.ContentHandler handler) throws XMLDBException
getContentAsSAX
in interface XMLResource
handler
- The ContentHandler to use.XMLDBException
-
|
Xindice API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |