org.exist.xmldb
Class LocalXMLResource
java.lang.Object
org.exist.xmldb.AbstractEXistResource
org.exist.xmldb.LocalXMLResource
- All Implemented Interfaces:
- EXistResource
- public class LocalXMLResource
- extends AbstractEXistResource
Local implementation of XMLResource.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
proxy
protected NodeProxy proxy
outputProperties
protected java.util.Properties outputProperties
lexicalHandler
protected org.xml.sax.ext.LexicalHandler lexicalHandler
content
protected java.lang.String content
file
protected java.io.File file
root
protected org.w3c.dom.Node root
value
protected AtomicValue value
datecreated
protected java.util.Date datecreated
datemodified
protected java.util.Date datemodified
LocalXMLResource
public LocalXMLResource(User user,
BrokerPool pool,
LocalCollection parent,
java.lang.String did)
throws XMLDBException
LocalXMLResource
public LocalXMLResource(User user,
BrokerPool pool,
LocalCollection parent,
NodeProxy p)
throws XMLDBException
getContent
public java.lang.Object getContent()
throws XMLDBException
- Throws:
XMLDBException
getContentAsDOM
public org.w3c.dom.Node getContentAsDOM()
throws XMLDBException
- Throws:
XMLDBException
getContentAsSAX
public void getContentAsSAX(org.xml.sax.ContentHandler handler)
throws XMLDBException
- Throws:
XMLDBException
getDocumentId
public java.lang.String getDocumentId()
throws XMLDBException
- Throws:
XMLDBException
getId
public java.lang.String getId()
throws XMLDBException
- Throws:
XMLDBException
getParentCollection
public Collection getParentCollection()
throws XMLDBException
- Throws:
XMLDBException
getResourceType
public java.lang.String getResourceType()
throws XMLDBException
- Throws:
XMLDBException
getCreationTime
public java.util.Date getCreationTime()
throws XMLDBException
- Specified by:
getCreationTime in interface EXistResource- Specified by:
getCreationTime in class AbstractEXistResource
- Throws:
XMLDBException
getLastModificationTime
public java.util.Date getLastModificationTime()
throws XMLDBException
- Specified by:
getLastModificationTime in interface EXistResource- Specified by:
getLastModificationTime in class AbstractEXistResource
- Throws:
XMLDBException
getContentLength
public int getContentLength()
throws XMLDBException
- Throws:
XMLDBException
setContent
public void setContent(java.lang.Object obj)
throws XMLDBException
- Sets the content for this resource. If value is of type File, it is
directly passed to the parser when Collection.storeResource is called.
Otherwise the method tries to convert the value to String.
Passing a File object should be preferred if the document is large. The
file's content will not be loaded into memory but directly passed to a
SAX parser.
- Throws:
XMLDBException - with expected error codes.
ErrorCodes.VENDOR_ERROR
for any vendor specific errors that occur.
setContentAsDOM
public void setContentAsDOM(org.w3c.dom.Node root)
throws XMLDBException
- Throws:
XMLDBException
setContentAsSAX
public org.xml.sax.ContentHandler setContentAsSAX()
throws XMLDBException
- Throws:
XMLDBException
getSAXFeature
public boolean getSAXFeature(java.lang.String arg0)
throws org.xml.sax.SAXNotRecognizedException,
org.xml.sax.SAXNotSupportedException
- Throws:
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException
setSAXFeature
public void setSAXFeature(java.lang.String arg0,
boolean arg1)
throws org.xml.sax.SAXNotRecognizedException,
org.xml.sax.SAXNotSupportedException
- Throws:
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException
getPermissions
public Permission getPermissions()
throws XMLDBException
- Specified by:
getPermissions in interface EXistResource- Specified by:
getPermissions in class AbstractEXistResource
- Throws:
XMLDBException
setLexicalHandler
public void setLexicalHandler(org.xml.sax.ext.LexicalHandler handler)
- Specified by:
setLexicalHandler in interface EXistResource- Overrides:
setLexicalHandler in class AbstractEXistResource
setProperties
protected void setProperties(java.util.Properties properties)
getDocument
protected DocumentImpl getDocument(DBBroker broker,
boolean lock)
throws XMLDBException
- Throws:
XMLDBException
getNode
public NodeProxy getNode()
throws XMLDBException
- Throws:
XMLDBException
getDocType
public org.w3c.dom.DocumentType getDocType()
throws XMLDBException
- Specified by:
getDocType in interface EXistResource- Overrides:
getDocType in class AbstractEXistResource
- Throws:
XMLDBException
setDocType
public void setDocType(org.w3c.dom.DocumentType doctype)
throws XMLDBException
- Specified by:
setDocType in interface EXistResource- Overrides:
setDocType in class AbstractEXistResource
- Throws:
XMLDBException
<oXygen/>
XML Editor
provides support for editing and debugging XQuery
expressions against the eXist XML Database.