|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.webdav.search.SearchInfo
SearchInfo
parses the 'searchrequest' element of a SEARCH
request body and performs basic validation. Both query language and the
query itself can be access from the resulting object.
NOTE: The query is expected to be represented by the text contained in the
Xml element specifying the query language, thus the 'basicsearch' defined
by the Webdav Search Internet Draft is not supported by this implementation.
<d:searchrequest xmlns:d="DAV:" dcr:="http://www.day.com/jcr/webdav/1.0" > <dcr:xpath>//sv:node[@sv:name='myapp:paragraph'][1]</dcr:xpath> </d:searchrequest>Would return the following values:
getLanguageName() -> xpath getQuery() -> //sv:node[@sv:name='myapp:paragraph'][1]
Field Summary |
Fields inherited from interface org.apache.jackrabbit.webdav.search.SearchConstants |
BASICSEARCH, HEADER_DASL, NAMESPACE, QUERY_GRAMMER_SET, XML_GRAMMER, XML_QUERY_GRAMMAR, XML_QUERY_SCHEMA_DISCOVERY, XML_SEARCHREQUEST |
Constructor Summary | |
SearchInfo(org.jdom.Document searchDocument)
Create a new SearchInfo from the specifying document
retrieved from the request body. |
|
SearchInfo(String language,
org.jdom.Namespace languageNamespace,
String query)
Create a new SearchInfo instance. |
Method Summary | |
String |
getLanguageName()
Returns the name of the query language to be used. |
org.jdom.Namespace |
getLanguageNameSpace()
Returns the namespace of the language specified with the search request element. |
String |
getQuery()
Return the query string. |
org.jdom.Document |
toXml()
Return the xml representation of this SearchInfo instance. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SearchInfo(String language, org.jdom.Namespace languageNamespace, String query)
SearchInfo
instance.
language
- languageNamespace
- query
- public SearchInfo(org.jdom.Document searchDocument)
SearchInfo
from the specifying document
retrieved from the request body.
searchDocument
-
IllegalArgumentException
- if the root element's name is other than
'searchrequest' or if it does not contain a single child element specifying
the query language to be used.Method Detail |
public String getLanguageName()
public org.jdom.Namespace getLanguageNameSpace()
public String getQuery()
public org.jdom.Document toXml()
SearchInfo
instance.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |