Oracle® Collaboration Suite Workspaces API Reference
10g Release 1 (10.1.2)

B25479-01


oracle.workspaces.search
Class CwSearchContainer

java.lang.Object
  extended byoracle.workspaces.search.CwSearchContainer


public class CwSearchContainer
extends java.lang.Object

A CwSearchContainer object specifies the container under which the search will take place - it scopes the search. Note that the query scope is a collection of search containers. The container consists of an entity type to search for: CwEntityType.WORKSPACE, CwEntityType.FILE, CwEntityType.DISCUSSION_MESSAGE, or CwEntityType.CALENDAR_EVENT. It also includes an entity descriptor, which specifies whether search occurs within a single workspace or across workspaces. The value CwSearchConstants.MY_WORKSPACES_DESCRIPTOR indicates a search across workspaces while CwSearchConstants.CW_ENTITY_DESCRIPTOR indicates a search within a single workspace. Note that CwSearchConstants.ALL_WORKSPACES_DESCRIPTOR is not supported in this release. Finally, the container may specify the CwUid of a specific entity in the case of a within-workspace search. It should be the CwUid of the workspace to search. The CwUid may be null if performing a cross-workspace search.


Constructor Summary
CwSearchContainer(CwEntityType searchEntityType, java.lang.String searchRootDescriptor, CwUid searchRootEntity)
This constructs a Cw Search container object.

Method Summary
boolean equals(CwSearchContainer obj)
Compares a given object with this one.
CwEntityType getSearchEntityType()
Returns the entity type to search for, which was set in the constructor.
java.lang.String getSearchRootDescriptor()
Returns the type of search root
CwUid getSearchRootEntity()
The CwUid object reperesenting the workspace to search; may be null.
static CwSearchContainer parseCwSearchContainer(java.lang.String containerAsString)
Parses the string representation of CwSearchContainer into an instance of it.
java.lang.String toString()
Generate the string representation of this object.

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

CwSearchContainer

public CwSearchContainer(CwEntityType searchEntityType,
                         java.lang.String searchRootDescriptor,
                         CwUid searchRootEntity)
This constructs a Cw Search container object. Query scope is a collection of search containers. This constructs an instance of a container. The container is specified using the following 3 parameters.
Parameters:
searchEntityType - this specifies what entity type to search for. Example of searchable entity types are CwEntityType.WORKSPACE, CwEntityType.FILE, CwEntityType.DISCUSSION_MESSAGE etc.
searchRootDescriptor - this is the root type under which the search will be executed. Valid root descriptors are: CwSearchConstants.MY_WORKSPACES_DESCRIPTOR, CwSearchConstants.CW_ENTITY_DESCRIPTOR. For the first case, the third parameter of the constructor will be ignored, so null can be specified for the third parameter. For CwSearchConstants.CW_ENTITY_DESCRIPTOR, the third parameter must be a valid CwUid object. The search will be performed under the entity specified by the CwUid object.
searchRootEntity - the CwUid representing the workspace to search. This is considered only if searchRootDescriptor is specified as CwSearchConstants.CW_ENTITY_DESCRIPTOR, else it is ignored.

Method Detail

equals

public boolean equals(CwSearchContainer obj)
Compares a given object with this one.
Parameters:
obj - an instance of CwSearchContainer.
Returns:
true if the two objects represent the same container. false, otherwise.

getSearchEntityType

public CwEntityType getSearchEntityType()
Returns the entity type to search for, which was set in the constructor.
Returns:
the entity type to search for.

getSearchRootDescriptor

public java.lang.String getSearchRootDescriptor()
Returns the type of search root
Returns:
the search root type specified as one of the constants: CwSearchConstants.MY_WORKSPACES_DESCRIPTOR, CwSearchConstants.CW_ENTITY_DESCRIPTOR.

getSearchRootEntity

public CwUid getSearchRootEntity()
The CwUid object reperesenting the workspace to search; may be null.
Returns:
the CwUid for the search root workspace.

parseCwSearchContainer

public static CwSearchContainer parseCwSearchContainer(java.lang.String containerAsString)
                                                throws CwException
Parses the string representation of CwSearchContainer into an instance of it.
Parameters:
containerAsString - the string representation of the search container.
Returns:
an instance of CwSearchContainer
Throws:
CwException

toString

public java.lang.String toString()
Generate the string representation of this object.
Returns:
the string representing this search container.

Copyright © 2001, 2005, Oracle. All rights reserved.