public interface SearchQuery
Modifier and Type | Method and Description |
---|---|
SearchQuery |
clone() |
boolean |
equals(java.lang.Object obj)
Tests this
SearchQuery instance for equality with the given object. |
ConstraintContext |
getConstraintContext() |
java.lang.Object |
getProperty(java.lang.String key) |
java.lang.String |
getQueryString()
Returns a textual representation of this
SearchQuery instance. |
SearchGraph |
getSearchGraph() |
void |
parseQueryString(java.lang.String query)
Reads the given
query string and converts it into a
collection of constraint objects. |
void |
setProperty(java.lang.String key,
java.lang.Object value) |
void |
setSearchGraph(SearchGraph graph) |
void parseQueryString(java.lang.String query) throws de.ims.icarus.util.UnsupportedFormatException
query
string and converts it into a
collection of constraint objects. If the provided query
does not satisfy syntactic requirements enforced by the implementing
SearchQuery
class then an UnsupportedFormatException
should be thrown.
Note the special requirements mentioned at getQueryString()
de.ims.icarus.util.UnsupportedFormatException
getQueryString()
ConstraintContext getConstraintContext()
java.lang.String getQueryString()
SearchQuery
instance.
If it was created using a query
string then this method should
return this string in raw form. Otherwise the constraint objects within this
instance should be used to construct such a query
string.
Note: It is required that all implementations honor the following
special convention. A query
string obtained from a call to
getQueryString()
on some SearchQuery
A must
result in exactly the same collection of constraint objects when passed
to the parseQueryString(String)
method of some other SearchQuery
instance B. This holds as long as both instances operate on the
same search language! In addition an implementation may ignore
a call to parseQueryString(String)
when the supplied query
string matches the current collection of constraints.
This special convention applies only in a one-way manner! It is
not required that an implementation guarantees consistency of
getQueryString()
results in regard to the original input
passed to parseQueryString(String)
!
parseQueryString(String)
boolean equals(java.lang.Object obj)
SearchQuery
instance for equality with the given object.
Equality in terms of SearchQuery
objects is defined by equality of the
strings returned by calls to their respective getQueryString()
methods!equals
in class java.lang.Object
void setProperty(java.lang.String key, java.lang.Object value)
java.lang.Object getProperty(java.lang.String key)
SearchGraph getSearchGraph()
void setSearchGraph(SearchGraph graph) throws de.ims.icarus.util.UnsupportedFormatException
de.ims.icarus.util.UnsupportedFormatException
SearchQuery clone()