org.exist.xmldb
Class RemoteXMLResource

java.lang.Object
  extended by org.exist.xmldb.AbstractRemoteResource
      extended by org.exist.xmldb.RemoteXMLResource
All Implemented Interfaces:
EXistResource, ExtendedResource, Resource, XMLResource

public class RemoteXMLResource
extends AbstractRemoteResource
implements XMLResource


Field Summary
 
Fields inherited from interface org.xmldb.api.modules.XMLResource
RESOURCE_TYPE
 
Constructor Summary
RemoteXMLResource(RemoteCollection parent, int handle, int pos, XmldbURI docId, String id)
           
RemoteXMLResource(RemoteCollection parent, XmldbURI docId, String id)
           
 
Method Summary
 Object getContent()
           
 Node getContentAsDOM()
           
 void getContentAsSAX(ContentHandler handler)
           
 void getContentIntoAStream(OutputStream os)
          It saves the resource to the local stream given as input parameter.
 DocumentType getDocType()
           
 String getDocumentId()
           
 Object getExtendedContent()
          It returns an object representing the content, in the representation which needs less memory.
 String getId()
           
 String getNodeId()
           
 String getResourceType()
           
 boolean getSAXFeature(String arg0)
           
 InputStream getStreamContent()
          It returns an stream to the content, whichever it is its origin
 long getStreamLength()
          It returns the length of the content, whichever it is its origin
 void setContent(Object value)
           
 void setContentAsDOM(Node root)
           
 ContentHandler setContentAsSAX()
           
 void setDocType(DocumentType doctype)
           
 void setLexicalHandler(LexicalHandler handler)
           
 void setSAXFeature(String arg0, boolean arg1)
           
 void setXMLReader(XMLReader xmlReader)
          Sets the external XMLReader to use.
 
Methods inherited from class org.exist.xmldb.AbstractRemoteResource
freeResources, getContentIntoAFile, getContentLength, getCreationTime, getExtendedContentLength, getLastModificationTime, getMimeType, getParentCollection, getPermissions, setContentLength, setContentLength, setMimeType, setPermissions
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xmldb.api.base.Resource
getParentCollection
 

Constructor Detail

RemoteXMLResource

public RemoteXMLResource(RemoteCollection parent,
                         XmldbURI docId,
                         String id)
                  throws XMLDBException
Throws:
XMLDBException

RemoteXMLResource

public RemoteXMLResource(RemoteCollection parent,
                         int handle,
                         int pos,
                         XmldbURI docId,
                         String id)
                  throws XMLDBException
Throws:
XMLDBException
Method Detail

getContent

public Object getContent()
                  throws XMLDBException
Specified by:
getContent in interface Resource
Overrides:
getContent in class AbstractRemoteResource
Throws:
XMLDBException

getContentAsDOM

public Node getContentAsDOM()
                     throws XMLDBException
Specified by:
getContentAsDOM in interface XMLResource
Throws:
XMLDBException

getContentAsSAX

public void getContentAsSAX(ContentHandler handler)
                     throws XMLDBException
Specified by:
getContentAsSAX in interface XMLResource
Throws:
XMLDBException

getNodeId

public String getNodeId()

getDocumentId

public String getDocumentId()
                     throws XMLDBException
Specified by:
getDocumentId in interface XMLResource
Throws:
XMLDBException

getId

public String getId()
             throws XMLDBException
Specified by:
getId in interface Resource
Throws:
XMLDBException

getResourceType

public String getResourceType()
                       throws XMLDBException
Specified by:
getResourceType in interface Resource
Throws:
XMLDBException

setXMLReader

public void setXMLReader(XMLReader xmlReader)
Sets the external XMLReader to use.

Parameters:
xmlReader - the XMLReader

setContent

public void setContent(Object value)
                throws XMLDBException
Specified by:
setContent in interface Resource
Throws:
XMLDBException

setContentAsDOM

public void setContentAsDOM(Node root)
                     throws XMLDBException
Specified by:
setContentAsDOM in interface XMLResource
Throws:
XMLDBException

setContentAsSAX

public ContentHandler setContentAsSAX()
                               throws XMLDBException
Specified by:
setContentAsSAX in interface XMLResource
Throws:
XMLDBException

getSAXFeature

public boolean getSAXFeature(String arg0)
                      throws SAXNotRecognizedException,
                             SAXNotSupportedException
Specified by:
getSAXFeature in interface XMLResource
Throws:
SAXNotRecognizedException
SAXNotSupportedException

setSAXFeature

public void setSAXFeature(String arg0,
                          boolean arg1)
                   throws SAXNotRecognizedException,
                          SAXNotSupportedException
Specified by:
setSAXFeature in interface XMLResource
Throws:
SAXNotRecognizedException
SAXNotSupportedException

setLexicalHandler

public void setLexicalHandler(LexicalHandler handler)
Specified by:
setLexicalHandler in interface EXistResource

getDocType

public DocumentType getDocType()
                        throws XMLDBException
Specified by:
getDocType in interface EXistResource
Throws:
XMLDBException

setDocType

public void setDocType(DocumentType doctype)
                throws XMLDBException
Specified by:
setDocType in interface EXistResource
Throws:
XMLDBException

getContentIntoAStream

public void getContentIntoAStream(OutputStream os)
                           throws XMLDBException
Description copied from interface: ExtendedResource
It saves the resource to the local stream given as input parameter. Do NOT confuse with set content.

Specified by:
getContentIntoAStream in interface ExtendedResource
Throws:
XMLDBException

getExtendedContent

public Object getExtendedContent()
                          throws XMLDBException
Description copied from interface: ExtendedResource
It returns an object representing the content, in the representation which needs less memory.

Specified by:
getExtendedContent in interface ExtendedResource
Throws:
XMLDBException

getStreamContent

public InputStream getStreamContent()
                             throws XMLDBException
Description copied from interface: ExtendedResource
It returns an stream to the content, whichever it is its origin

Specified by:
getStreamContent in interface ExtendedResource
Throws:
XMLDBException

getStreamLength

public long getStreamLength()
                     throws XMLDBException
Description copied from interface: ExtendedResource
It returns the length of the content, whichever it is its origin

Specified by:
getStreamLength in interface ExtendedResource
Throws:
XMLDBException


Copyright (C) The eXist-db Project. All rights reserved.