|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objectorg.exist.xmldb.RemoteXMLResource
public class RemoteXMLResource
| 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()
Retrieves the content from the resource. |
Node |
getContentAsDOM()
Returns the content of the Resource as a DOM Node. |
void |
getContentAsSAX(ContentHandler handler)
Allows you to use a ContentHandler to parse the XML data from
the database for use in an application. |
int |
getContentLength()
|
Date |
getCreationTime()
|
DocumentType |
getDocType()
|
String |
getDocumentId()
Returns the unique id for the parent document to this Resource
or null if the Resource does not have a parent document. |
String |
getId()
Returns the unique id for this Resource or null if the
Resource is anonymous. |
Date |
getLastModificationTime()
|
String |
getMimeType()
|
String |
getNodeId()
|
Collection |
getParentCollection()
Returns the Collection instance that this resource is
associated with. |
Permission |
getPermissions()
|
String |
getResourceType()
Returns the resource type for this Resource. |
boolean |
getSAXFeature(String arg0)
Returns current setting of a SAX feature that will be used when this XMLResource is used to produce SAX events (through the
getContentAsSAX() method) |
void |
setContent(Object value)
Sets the content for this resource. |
void |
setContentAsDOM(Node root)
Sets the content of the Resource using a DOM Node as the
source. |
ContentHandler |
setContentAsSAX()
Sets the content of the Resource using a SAX
ContentHandler. |
void |
setContentLength(int len)
|
void |
setDocType(DocumentType doctype)
|
void |
setLexicalHandler(LexicalHandler handler)
|
void |
setMimeType(String mime)
|
void |
setPermissions(Permission perms)
|
void |
setSAXFeature(String arg0,
boolean arg1)
Sets a SAX feature that will be used when this XMLResource
is used to produce SAX events (through the getContentAsSAX() method) |
void |
setXMLReader(XMLReader xmlReader)
Sets the external XMLReader to use. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RemoteXMLResource(RemoteCollection parent,
XmldbURI docId,
String id)
throws XMLDBException
XMLDBException
public RemoteXMLResource(RemoteCollection parent,
int handle,
int pos,
XmldbURI docId,
String id)
throws XMLDBException
XMLDBException| Method Detail |
|---|
public Date getCreationTime()
throws XMLDBException
getCreationTime in interface EXistResourceXMLDBException
public Date getLastModificationTime()
throws XMLDBException
getLastModificationTime in interface EXistResourceXMLDBException
public Object getContent()
throws XMLDBException
Resource
getContent in interface ResourceXMLDBException - with expected error codes.ErrorCodes.VENDOR_ERROR for any vendor
specific errors that occur.
public Node getContentAsDOM()
throws XMLDBException
XMLResourceResource as a DOM Node.
getContentAsDOM in interface XMLResourceNode
XMLDBException - with expected error codes.ErrorCodes.VENDOR_ERROR for any vendor
specific errors that occur.
public void getContentAsSAX(ContentHandler handler)
throws XMLDBException
XMLResourceContentHandler to parse the XML data from
the database for use in an application.
getContentAsSAX in interface XMLResourcehandler - the SAX ContentHandler to use to handle the
Resource content.
XMLDBException - with expected error codes.ErrorCodes.VENDOR_ERROR for any vendor
specific errors that occur.ErrorCodes.INVALID_RESOURCE if the
ContentHandler provided is null.public String getNodeId()
public String getDocumentId()
throws XMLDBException
XMLResourceResource
or null if the Resource does not have a parent document.
getDocumentId() is typically used with Resource
instances retrieved using a query. It enables accessing the parent
document of the Resource even if the Resource is
a child node of the document. If the Resource was not
obtained through a query then getId() and
getDocumentId() will return the same id.
getDocumentId in interface XMLResourceResource or
null if there is no parent document for this Resource.
XMLDBException - with expected error codes.ErrorCodes.VENDOR_ERROR for any vendor
specific errors that occur.
public String getId()
throws XMLDBException
ResourceResource or null if the
Resource is anonymous. The Resource will be
anonymous if it is obtained as the result of a query.
getId in interface ResourceXMLDBException - with expected error codes.ErrorCodes.VENDOR_ERROR for any vendor
specific errors that occur.
public Collection getParentCollection()
throws XMLDBException
ResourceCollection instance that this resource is
associated with. All resources must exist within the context of a
collection.
getParentCollection in interface ResourceXMLDBException - with expected error codes.ErrorCodes.VENDOR_ERROR for any vendor
specific errors that occur.
public String getResourceType()
throws XMLDBException
Resource
getResourceType in interface ResourceXMLDBException - with expected error codes.ErrorCodes.VENDOR_ERROR for any vendor
specific errors that occur.public void setXMLReader(XMLReader xmlReader)
xmlReader - the XMLReader
public void setContent(Object value)
throws XMLDBException
Resource
setContent in interface Resourcevalue - the content value to set for the resource.
XMLDBException - with expected error codes.ErrorCodes.VENDOR_ERROR for any vendor
specific errors that occur.
public void setContentAsDOM(Node root)
throws XMLDBException
XMLResourceResource using a DOM Node as the
source.
setContentAsDOM in interface XMLResourceroot - The new content value
XMLDBException - with expected error codes.ErrorCodes.VENDOR_ERROR for any vendor
specific errors that occur.ErrorCodes.INVALID_RESOURCE if the content value provided is
null.ErrorCodes.WRONG_CONTENT_TYPE if the content provided in not
a valid DOM Node.
public ContentHandler setContentAsSAX()
throws XMLDBException
XMLResourceResource using a SAX
ContentHandler.
setContentAsSAX in interface XMLResourceContentHandler that can be used to add content
into the Resource.
XMLDBException - with expected error codes.ErrorCodes.VENDOR_ERROR for any vendor
specific errors that occur.
public boolean getSAXFeature(String arg0)
throws SAXNotRecognizedException,
SAXNotSupportedException
XMLResourceXMLResource is used to produce SAX events (through the
getContentAsSAX() method)
getSAXFeature in interface XMLResourcearg0 - Feature name. Standard SAX feature names are documented at
http://sax.sourceforge.net/.
SAXNotRecognizedException
SAXNotSupportedException
public void setSAXFeature(String arg0,
boolean arg1)
throws SAXNotRecognizedException,
SAXNotSupportedException
XMLResourceXMLResource
is used to produce SAX events (through the getContentAsSAX() method)
setSAXFeature in interface XMLResourcearg0 - Feature name. Standard SAX feature names are documented at
http://sax.sourceforge.net/.arg1 - Set or unset feature
SAXNotRecognizedException
SAXNotSupportedExceptionpublic void setContentLength(int len)
public int getContentLength()
throws XMLDBException
getContentLength in interface EXistResourceXMLDBExceptionpublic void setPermissions(Permission perms)
public Permission getPermissions()
getPermissions in interface EXistResourcepublic void setLexicalHandler(LexicalHandler handler)
setLexicalHandler in interface EXistResourcepublic void setMimeType(String mime)
setMimeType in interface EXistResourcepublic String getMimeType()
getMimeType in interface EXistResource
public DocumentType getDocType()
throws XMLDBException
getDocType in interface EXistResourceXMLDBException
public void setDocType(DocumentType doctype)
throws XMLDBException
setDocType in interface EXistResourceXMLDBException
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||