***  This class provides Binary Compatibility only, not Source Compatibility  ***

com.sas.services.publish.metadata
Class PackageFilter

com.sas.services.publish.metadata.PackageFilter
All Implemented Interfaces:
FilterInterface, java.io.Serializable

public class PackageFilter

This class extends KeywordFilter to provide a convenient mechanism to search for package objects in multiple repository types. It allows searching on name, description, name/value pairs, the abstract, and the owning channel. Due to restrictions in the searching capabilities of the Metadata Server, only one of the abstract, channel, and name/value pairs can be searched on at once. If more than one is set, the order of preference is channel, name/value pairs and abstract. Also, exclusion on the basis of name value pairs doesn't work with the Metadata Server or a WebDAV server.

Since:
1.0
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.sas.services.information.metadata.KeywordFilter
_keywords
 
Fields inherited from class com.sas.services.information.Filter
_component
 
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
PackageFilter()
           
PackageFilter(java.lang.String key, int relation, java.lang.String value)
           
 
Method Summary
 void clearNameValuePairs()
           
 void excludeNameValuePair(java.lang.String name, java.lang.String value)
           
 ChannelInterface getChannel()
           
 java.lang.String getDAVBasicSearchString()
          Get the filter in the form of a DAV basicsearch XML request.
 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 getLDAPType()
           
 java.lang.String getOMRType()
          Get the OMR type.
 java.lang.String getXMLSelectString()
          Get the filter in the form of an XMLSelect statement.
 void includeNameValuePair(java.lang.String name, java.lang.String value)
           
 void setAbstract(java.util.List abstracts)
          Add search by abstract.
 void setAbstract(java.lang.String abstractString, int operation)
          Add search by abstract.
 void setChannel(ChannelInterface channel)
           
 void setDescription(java.lang.String description, int operation)
          Add search by description.
 
Methods inherited from class com.sas.services.information.metadata.KeywordFilter
addKeyword, getKeywordSelectString, removeKeyword
 
Methods inherited from class com.sas.services.information.Filter
addProtocol, addSearchOption, component2JCRXPath, component2Select, getDAVBase, getDAVScope, getExplicitSearchString, getFilterComponent, getFilterString, getJCRType, getJCRXPathString, getName, getOMRFlags, getOMROption, getOMRRepository, getOMRSearchString, getOMRTemplate, getProtocols, getRdbmsTable, getSearchOptions, getType, getXPathString, removeProtocol, removeSearchOption, setDAVBase, setDAVScope, setExplicitSearchString, setFilterComponent, setName, setOMRFlags, setOMROption, setOMRRepository, setOMRTemplate, setProtocols, setRdbmsTable, setType, toString
 

Constructor Detail

PackageFilter

public PackageFilter()

PackageFilter

public PackageFilter(java.lang.String key,
                     int relation,
                     java.lang.String value)
Method Detail

includeNameValuePair

public void includeNameValuePair(java.lang.String name,
                                 java.lang.String value)

excludeNameValuePair

public void excludeNameValuePair(java.lang.String name,
                                 java.lang.String value)

clearNameValuePairs

public void clearNameValuePairs()

getOMRType

public java.lang.String getOMRType()
Description copied from class: Filter
Get the OMR type. Return the type by default. subclasses may override this to return a different string. This method is mostly for use by the OMIRepository class.

Specified by:
getOMRType in interface FilterInterface
Overrides:
getOMRType in class Filter
Returns:
The OMR specific type to search for.

getLDAPType

public java.lang.String getLDAPType()

getDAVType

public java.lang.String getDAVType()
Description copied from class: Filter
Get the DAV type string. Return the type by default. Subclasses may override this to return a different string. This method is for use by the DAVRepository class.

Specified by:
getDAVType in interface FilterInterface
Overrides:
getDAVType in class Filter
Returns:
the DAV specific type to search for.

getChannel

public ChannelInterface getChannel()

setChannel

public void setChannel(ChannelInterface channel)

setDescription

public void setDescription(java.lang.String description,
                           int operation)
Add search by description.

Parameters:
description - The text to search for in the description.
operation - Either FilterComponent.EQUALS or FilterComponent.CONTAINS

setAbstract

public void setAbstract(java.lang.String abstractString,
                        int operation)
Add search by abstract.

Parameters:
abstractString - The text to search for in the abstract.
operation - Either FilterComponent.EQUALS or FilterComponent.CONTAINS

setAbstract

public void setAbstract(java.util.List abstracts)
Add search by abstract.

Parameters:
abstracts - The list of abstract strings. Each item is text to search for in the abstract. This uses the FilterComponent.CONTAINS operator since a list of Strings is used.

getXMLSelectString

public java.lang.String getXMLSelectString()
Get the filter in the form of an XMLSelect statement.

Specified by:
getXMLSelectString in interface FilterInterface
Overrides:
getXMLSelectString in class KeywordFilter
Returns:
An XMLSelect string to pass to OMR.

getDAVBasicSearchString

public java.lang.String getDAVBasicSearchString()
Description copied from class: Filter
Get the filter in the form of a DAV basicsearch XML request. This is described in the WebDAV SEARCH proposal.

Specified by:
getDAVBasicSearchString in interface FilterInterface
Overrides:
getDAVBasicSearchString in class Filter
Returns:
An XML basicsearch request to pass to a DAV server.

getDAVSQLString

public java.lang.String getDAVSQLString()
Description copied from class: Filter
Get the filter in the form of a DAV SQL request. This is aimed at the Microsoft servers - Internet Information Server, SharePoint Portal Server and Exchange server.

Specified by:
getDAVSQLString in interface FilterInterface
Overrides:
getDAVSQLString in class Filter
Returns:
An XML DAV SQL request to pass to a DAV server.

***  This class provides Binary Compatibility only, not Source Compatibility  ***




Copyright © 2009 SAS Institute Inc. All Rights Reserved.