|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compass.core.xml.RawXmlObject
public class RawXmlObject
An XmlObject that has an xml string representation. Mainly used for simpliciy,
where Compass will use the configured XmlContentConverter
in order to convert to xml string into the actual XmlObject implementation.
This object will only be used when saving xml object into Compass. When Compass returns xml objects
as a restult of a query or get/load operations, the actual XmlObject will be returned.
Naturally, since the xml string will only be parsed when Compass will convert this object, all the
XmlObject methods are not implemented. The XmlObject is just used as a marker interface
to use the correct xsem supported converters.
| Constructor Summary | |
|---|---|
RawXmlObject(Reader xml)
Creates a new String based xml object using a Reader holding the actual xml content. |
|
RawXmlObject(String xml)
Creates a new String based xml object using a String holding the actual xml content. |
|
| Method Summary | |
|---|---|
boolean |
canCompileXpath()
Returns true of the xml object supports xpath expression
compilation. |
XmlXPathExpression |
compile(String path)
Compiles the given xpath expression. |
String |
getName()
Returns the name of the xml object. |
Map<String,String> |
getNamespaces()
Returns a lookup map for namespaces (prefix to uri). |
String |
getValue()
Returns the value of the xml object. |
Reader |
getXml()
|
XmlObject[] |
selectPath(String path)
Returns a list of xml objects matching the given xpath expression. |
void |
setNamespaces(Map<String,String> namespaces)
Sets a lookup map for given namespaces (prefix to uri). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RawXmlObject(String xml)
public RawXmlObject(Reader xml)
| Method Detail |
|---|
public Reader getXml()
public void setNamespaces(Map<String,String> namespaces)
XmlObject
setNamespaces in interface XmlObjectpublic Map<String,String> getNamespaces()
XmlObject
getNamespaces in interface XmlObjectpublic String getName()
XmlObject
getName in interface XmlObjectpublic String getValue()
XmlObject
getValue in interface XmlObject
public XmlObject[] selectPath(String path)
throws Exception
XmlObject
selectPath in interface XmlObjectpath - The xpath expression
Exceptionpublic boolean canCompileXpath()
XmlObjecttrue of the xml object supports xpath expression
compilation.
canCompileXpath in interface XmlObject
public XmlXPathExpression compile(String path)
throws Exception
XmlObject
compile in interface XmlObjectpath - The xpath expression
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||