|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.services.information.Filter
public class Filter
The Filter class describes a means for setting and getting information used to limit the results of a search against a repository. While it would be nice to make it completely repository-neutral, there are concepts and mechanisms that just don't translate.
Field Summary | |
---|---|
protected FilterComponent |
_component
The component to filter on. |
Fields inherited from interface com.sas.services.information.FilterInterface |
---|
BASE_SCOPE, FILTERCOMPONENT_UNSUPPORTED, FLAG_OVERRIDE, ONELEVEL_SCOPE, PROTOCOL_DAV, PROTOCOL_HIBERNATE, PROTOCOL_IPOD, PROTOCOL_LDAP, PROTOCOL_OMI, SUBTREE_SCOPE |
Constructor Summary | |
---|---|
Filter()
Default Constructor. |
|
Filter(java.lang.String key,
int relation,
java.lang.String value)
Construct a new Filter using the provided key, relation and value to create a component for this Filter. |
Method Summary | |
---|---|
void |
addProtocol(java.lang.String protocol)
Add a protocol string to the list to be searched (e.g., "omi", "dav"). |
void |
addSearchOption(java.lang.String name,
java.lang.Object option)
Add a search option. |
protected java.lang.String |
component2JCRXPath(FilterComponent component)
|
protected java.lang.String |
component2Select(FilterComponent component)
For 9.3, this method is used for backwards compatibility only. |
java.lang.String |
getDAVBase()
Get the DAV search base. |
java.lang.String |
getDAVBasicSearchString()
Get the filter in the form of a DAV basicsearch XML request. |
int |
getDAVScope()
Get the scope of the search for DAV searches. |
java.lang.String |
getDAVSQLString()
Get the filter in the form of a DAV SQL request. |
java.lang.String |
getDAVType()
Get the DAV type string. |
java.lang.String |
getExplicitSearchString()
Get the explicit search string set by the client. |
FilterComponent |
getFilterComponent()
Get the FilterComponent for this filter. |
java.lang.String |
getFilterString()
Get the filter in a generic string form. |
java.lang.String |
getJCRType()
Get the type string. |
java.lang.String |
getJCRXPathString()
Get an XPath string to use to filter a search against a Java Content Repository. |
java.lang.String |
getName()
Get the name of the object to look for. |
int |
getOMRFlags()
Get the flags to add to the OMI request. |
java.lang.String |
getOMROption()
Get the OMR option string. |
java.lang.String |
getOMRRepository()
Get the string representing the OMR repository name or ID to perform the search in. |
java.lang.String |
getOMRSearchString()
Returns the OMR specific search string for this filter. |
java.lang.String |
getOMRTemplate()
Get a template string used to format the data coming back from OMR. |
java.lang.String |
getOMRType()
Get the OMR type. |
java.util.List |
getProtocols()
Get the List of protocols that were set to be searched. |
java.lang.String |
getRdbmsTable()
Get the relational database table to search. |
java.util.Map |
getSearchOptions()
Get the Map of search options for this Filter. |
java.lang.String |
getType()
Get the type of object to search for. |
java.lang.String |
getXMLSelectString()
Get the filter in the form of an XMLSelect statement. |
java.lang.String |
getXPathString()
Deprecated. in favor of getXMLSelect(). |
void |
removeProtocol(java.lang.String protocol)
Remove a protocol from the list. |
void |
removeSearchOption(java.lang.String name)
Remove the named search option. |
void |
setDAVBase(java.lang.String base)
Set the DAV search base. |
void |
setDAVScope(int scope)
Set the DAV search scope. |
void |
setExplicitSearchString(java.lang.String protocol,
java.lang.String searchString)
If the client knows exactly the search string they want to use, they may set it here. |
void |
setFilterComponent(FilterComponent component)
Set the component to use with this filter. |
void |
setName(java.lang.String name)
Set the name of the object to search for. |
void |
setOMRFlags(int flags)
Set flags on the OMI request sent to the OMR server. |
void |
setOMROption(java.lang.String option)
Set the OMR option string. |
void |
setOMRRepository(java.lang.String reposid)
Set the repository name or ID to perform the search in. |
void |
setOMRTemplate(java.lang.String template)
Set the OMR template. |
void |
setProtocols(java.util.List protocols)
Set the list of protocols to search. |
void |
setRdbmsTable(java.lang.String table)
For Relational searches, set the table name to search. |
void |
setType(java.lang.String type)
Set the type to search for. |
java.lang.String |
toString()
Get a string representation of the filter suitable for output. |
Field Detail |
---|
protected FilterComponent _component
Constructor Detail |
---|
public Filter()
public Filter(java.lang.String key, int relation, java.lang.String value)
key
- The key to use for comparison.relation
- The relationship between the key and value to
test for. Usually FilterComponent.EQUALS.value
- The value to test for.Method Detail |
---|
public java.lang.String getFilterString()
getFilterString
in interface FilterInterface
public java.lang.String toString()
toString
in class java.lang.Object
public void setFilterComponent(FilterComponent component)
setFilterComponent
in interface FilterInterface
component
- The new component to add to this filter.public FilterComponent getFilterComponent()
FilterInterface
getFilterComponent
in interface FilterInterface
public void setType(java.lang.String type)
setType
in interface FilterInterface
type
- The object type to search for.public java.lang.String getType()
getType
in interface FilterInterface
public java.lang.String getOMRType()
getOMRType
in interface FilterInterface
public java.lang.String getDAVType()
getDAVType
in interface FilterInterface
public java.lang.String getJCRType()
public void setName(java.lang.String name)
setName
in interface FilterInterface
name
- The object name.public java.lang.String getName()
getName
in interface FilterInterface
public java.lang.String getOMRSearchString()
getOMRSearchString
in interface FilterInterface
public java.lang.String getXMLSelectString()
getXMLSelectString
in interface FilterInterface
protected java.lang.String component2Select(FilterComponent component)
protected java.lang.String component2JCRXPath(FilterComponent component)
public java.lang.String getXPathString()
getXPathString
in interface FilterInterface
public java.lang.String getJCRXPathString()
getJCRXPathString
in interface FilterInterface
public java.lang.String getOMRTemplate()
getOMRTemplate
in interface FilterInterface
public void setOMRTemplate(java.lang.String template)
The template will be passed to the metadata server and can control the total set of associated objects that will be returned from the query.
setOMRTemplate
in interface FilterInterface
template
- The template to pass to OMR to format results.public java.lang.String getOMROption()
getOMROption
in interface FilterInterface
public void setOMROption(java.lang.String option)
setOMROption
in interface FilterInterface
option
- The string to pass to OMR as options.public void setOMRFlags(int flags)
setOMRFlags
in interface FilterInterface
flags
- The OMI flags to add to the normal search flags.public int getOMRFlags()
getOMRFlags
in interface FilterInterface
public java.lang.String getOMRRepository()
getOMRRepository
in interface FilterInterface
public void setOMRRepository(java.lang.String reposid)
This option is used by OMR repository instances to set the repository to search. It does not limit the search to that one repository, or even to OMR repositories. To perform a search against a single repository, get a handle to that repository through the UserContext, or use the repositiory grouping mechanism of the Information Service.
setOMRRepository
in interface FilterInterface
reposid
- The repository name or ID to search.public java.lang.String getDAVBase()
getDAVBase
in interface FilterInterface
public void setDAVBase(java.lang.String base)
setDAVBase
in interface FilterInterface
base
- The search base for searches represented by this filter.public void setRdbmsTable(java.lang.String table)
FilterInterface
setRdbmsTable
in interface FilterInterface
table
- The relational table to search for objects.public java.lang.String getRdbmsTable()
FilterInterface
getRdbmsTable
in interface FilterInterface
public void setDAVScope(int scope)
setDAVScope
in interface FilterInterface
scope
- The new scope of the search.public int getDAVScope()
getDAVScope
in interface FilterInterface
public java.lang.String getDAVBasicSearchString()
getDAVBasicSearchString
in interface FilterInterface
public java.lang.String getDAVSQLString()
getDAVSQLString
in interface FilterInterface
public void addProtocol(java.lang.String protocol)
FilterInterface
addProtocol
in interface FilterInterface
protocol
- A protocol string to control the types of repositories
to search.public void removeProtocol(java.lang.String protocol)
FilterInterface
removeProtocol
in interface FilterInterface
protocol
- The protocol string to remove.public void setProtocols(java.util.List protocols)
FilterInterface
setProtocols
in interface FilterInterface
protocols
- A List of protocol Strings (e.g., "omi", "dav").public java.util.List getProtocols()
FilterInterface
getProtocols
in interface FilterInterface
public void setExplicitSearchString(java.lang.String protocol, java.lang.String searchString)
FilterInterface
setExplicitSearchString
in interface FilterInterface
protocol
- The protocol for which the search string is to be
used.searchString
- The search string to be used for the search.public java.lang.String getExplicitSearchString()
FilterInterface
getExplicitSearchString
in interface FilterInterface
public void addSearchOption(java.lang.String name, java.lang.Object option)
FilterInterface
addSearchOption
in interface FilterInterface
name
- The name of the option to be added.option
- The option value. This is usually a String, but
may be other object types.public void removeSearchOption(java.lang.String name)
FilterInterface
removeSearchOption
in interface FilterInterface
name
- The name of the option to remove.public java.util.Map getSearchOptions()
FilterInterface
getSearchOptions
in interface FilterInterface
|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |