|
Xindice API version 1.2m1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | 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.
Field Summary | |
protected org.xmldb.api.base.Collection |
collection
|
protected String |
content
|
protected String |
documentId
|
protected String |
id
|
static String |
SAX_NAMESPACE_PREFIXES_FEATURE
This is a SAX feature that controls how namespaces are reported in SAX. |
static String |
SAX_NAMESPACES_FEATURE
This is a SAX feature that controls how namespaces are reported in SAX. |
Fields inherited from interface org.xmldb.api.modules.XMLResource |
RESOURCE_TYPE |
Constructor Summary | |
XMLResourceImpl(String id,
org.xmldb.api.base.Collection collection)
Constructor for the XMLResourceImpl object |
|
XMLResourceImpl(String id,
org.xmldb.api.base.Collection collection,
String content)
Constructor for the XMLResourceImpl object |
|
XMLResourceImpl(String id,
org.xmldb.api.base.Collection collection,
SymbolTable syms,
byte[] bytes)
Constructor for the XMLResourceImpl object used in conjunction with Wire Compression |
|
XMLResourceImpl(String id,
String documentId,
org.xmldb.api.base.Collection collection)
Constructor for the XMLResourceImpl object |
|
XMLResourceImpl(String id,
String documentId,
org.xmldb.api.base.Collection collection,
String content)
Constructor for the XMLResourceImpl object |
|
XMLResourceImpl(String id,
String documentId,
org.xmldb.api.base.Collection collection,
SymbolTable syms,
byte[] bytes)
Constructor for the XMLResourceImpl object used in conjunction with Wire Compression |
Method Summary | |
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. |
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()
Gets the Id attribute of the XMLResourceImpl object |
org.xmldb.api.base.Collection |
getParentCollection()
Gets the parent Collection instance for this resource |
String |
getResourceType()
Returns the resource type for this Resource. |
boolean |
getSAXFeature(String feature)
Retrieves whether a SAX feature will be active for the SAX generated by the getContentAsSAX() method. |
void |
setContent(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. |
void |
setId(String name)
|
void |
setSAXFeature(String feature,
boolean value)
Allows SAX feature to be set for the SAX that is generated by getContentAsSAX. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String SAX_NAMESPACES_FEATURE
public static final String SAX_NAMESPACE_PREFIXES_FEATURE
protected String id
protected String documentId
protected org.xmldb.api.base.Collection collection
protected String content
Constructor Detail |
public XMLResourceImpl(String id, org.xmldb.api.base.Collection collection)
id
- The unique id associated with this resourcecollection
- the parent collection for the resourcepublic XMLResourceImpl(String id, String documentId, org.xmldb.api.base.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(String id, org.xmldb.api.base.Collection collection, String content)
id
- The unique id associated with this resourcecollection
- the parent collection for the resourcecontent
- the content to associate with the resourcepublic XMLResourceImpl(String id, String documentId, org.xmldb.api.base.Collection collection, 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(String id, String documentId, org.xmldb.api.base.Collection collection, SymbolTable syms, byte[] bytes)
id
- The unique id associated with this resourcedocumentId
- The document identifier this resource belongs tocollection
- The parent collection for the resourcesyms
- The collection's symbol tablebytes
- The content to associate with the resourcepublic XMLResourceImpl(String id, org.xmldb.api.base.Collection collection, SymbolTable syms, byte[] bytes)
id
- The unique id associated with this resourcecollection
- the parent collection for the resourcesyms
- The collection's symbol tablebytes
- the content to associate with the resourceMethod Detail |
public void setSAXFeature(String feature, boolean value)
setSAXFeature
in interface org.xmldb.api.modules.XMLResource
feature
- feature name. Currently supported features are namespace
reporting features described in the specification.value
- turn feature on or off.public boolean getSAXFeature(String feature)
getSAXFeature
in interface org.xmldb.api.modules.XMLResource
feature
- feature name. Currently supported features are namespace
reporting features described in the specification
public String getDocumentId() throws org.xmldb.api.base.XMLDBException
Resource
or null if the Resource
does not have a parent document.
getDocumentId
in interface org.xmldb.api.modules.XMLResource
Resource
or
null if there is no parent document for this Resource
.
org.xmldb.api.base.XMLDBException
public void setContent(Object value) throws org.xmldb.api.base.XMLDBException
setContent
in interface org.xmldb.api.base.Resource
value
- The new Content value
org.xmldb.api.base.XMLDBException
public void setContentAsDOM(org.w3c.dom.Node content) throws org.xmldb.api.base.XMLDBException
setContentAsDOM
in interface org.xmldb.api.modules.XMLResource
content
- Node containing the new content.
org.xmldb.api.base.XMLDBException
public org.xml.sax.ContentHandler setContentAsSAX() throws org.xmldb.api.base.XMLDBException
setContentAsSAX
in interface org.xmldb.api.modules.XMLResource
org.xmldb.api.base.XMLDBException
public org.xmldb.api.base.Collection getParentCollection() throws org.xmldb.api.base.XMLDBException
getParentCollection
in interface org.xmldb.api.base.Resource
org.xmldb.api.base.XMLDBException
public String getResourceType() throws org.xmldb.api.base.XMLDBException
getResourceType
in interface org.xmldb.api.base.Resource
org.xmldb.api.base.XMLDBException
public String getId() throws org.xmldb.api.base.XMLDBException
getId
in interface org.xmldb.api.base.Resource
org.xmldb.api.base.XMLDBException
public Object getContent() throws org.xmldb.api.base.XMLDBException
getContent
in interface org.xmldb.api.base.Resource
org.xmldb.api.base.XMLDBException
public org.w3c.dom.Node getContentAsDOM() throws org.xmldb.api.base.XMLDBException
getContentAsDOM
in interface org.xmldb.api.modules.XMLResource
org.xmldb.api.base.XMLDBException
public void getContentAsSAX(org.xml.sax.ContentHandler handler) throws org.xmldb.api.base.XMLDBException
getContentAsSAX
in interface org.xmldb.api.modules.XMLResource
handler
- The ContentHandler to use.
org.xmldb.api.base.XMLDBException
public void setId(String name)
|
Xindice API version 1.2m1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |