|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.sixdml.xindice.xiSixdmlResource
xiSixdmlCollection.java
An implementation of the SixdmlResource interface which maps to an XML resource in
Xindice. This class is NOT thread safe.
| Field Summary | |
private String |
name
The name of the resource, which should be the same as the Xindice key of XML file. |
(package private) XMLResource |
resource
The underlying Xindice resource used by this class. |
| Fields inherited from interface org.xmldb.api.modules.XMLResource |
RESOURCE_TYPE |
| Constructor Summary | |
private |
xiSixdmlResource()
Default constructor private because an instance of this class must always be instantiated with an underlying Xindice XML resource. |
(package private) |
xiSixdmlResource(XMLResource resource)
Creates a resource from a Xindice XML resource. |
| Method Summary | |
Object |
getContent()
Retrieves the content from the resource. |
Node |
getContentAsDOM()
Returns the content of the Resource as a DOM Node by making a deep copy of the DOM document used internally by this resource. |
void |
getContentAsSAX(ContentHandler handler)
Gets the content of the Resource using SAX ContentHandler as the source. |
String |
getDocumentId()
Returns the unique id for the parent document to this Resource. |
String |
getId()
Returns the unique id for this Resource or null if the Resource is anonymous. |
String |
getName()
Gets the name of the resource. |
Collection |
getParentCollection()
Returns the Collection instance that this resource is associated with. |
String |
getResourceType()
Returns the resource type for this Resource. |
static void |
main(String[] args)
Main used for testing class. |
void |
setContent(Object value)
Sets the content for this resource. |
void |
setContentAsDOM(Node content)
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. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
XMLResource resource
private String name
| Constructor Detail |
private xiSixdmlResource()
xiSixdmlResource(XMLResource resource)
throws XMLDBException
resource - the resource to initilize this object with.XMLDBException - if a call to the getId() function of the Resource passed in
fails.Resource.getId()| Method Detail |
public String getName()
getName in interface SixdmlResourcepublic String getDocumentId()
getDocumentId in interface XMLResource
public Node getContentAsDOM()
throws XMLDBException
getContentAsDOM in interface XMLResource
public void setContentAsDOM(Node content)
throws XMLDBException
setContentAsDOM in interface XMLResourcecontent - The new content valueXMLDBException - if the DOM node is not an Element node.
public void getContentAsSAX(ContentHandler handler)
throws XMLDBException
getContentAsSAX in interface XMLResourcehandler - the SAX content handlerXMLDBException - always.
public ContentHandler setContentAsSAX()
throws XMLDBException
setContentAsSAX in interface XMLResourceXMLDBException - always.
public Collection getParentCollection()
throws XMLDBException
getParentCollection in interface Resource
public String getId()
throws XMLDBException
getId in interface Resource
public String getResourceType()
throws XMLDBException
getResourceType in interface Resource
public Object getContent()
throws XMLDBException
getContent in interface Resource
public void setContent(Object value)
throws XMLDBException
setContent in interface Resourcevalue - the content value to set for the resource.
public static void main(String[] args)
throws Exception
args - IGNORED
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||