com.apelon.dts.client.term
Class TermSearchOptions

java.lang.Object
  extended by com.apelon.dts.client.term.TermSearchOptions

public class TermSearchOptions
extends Object

The term search options pass information to be used in a search, other than the actual search pattern. This includes the search limit, the namespace to search in, and optionally the TermAttributeSetDescriptor used to specify the attributes returned with the search result terms.

Copyright: Copyright (c) 2003

Company: Apelon, Inc.

Version:
DTS 3.0.0
Author:
Apelon, Inc.

Field Summary
static int ALL_NAMESPACES
          Indicates that all namespaces are to be searched.
static int DEFAULT_LIMIT
          Indicates MAXIMUM_LIMIT limit on the number of matches returned as default.
static int MAXIMUM_LIMIT
          Indicates maximum number of matches that can be returned.
 
Constructor Summary
TermSearchOptions()
          The default constructor.
TermSearchOptions(int searchLimit, int namespaceId)
          Convenience constructor for setting the most popular options.
TermSearchOptions(int searchLimit, int namespaceId, TermAttributeSetDescriptor asd)
          Convenience constructor for setting all options at once.
 
Method Summary
 TermAttributeSetDescriptor getAttributeSetDescriptor()
          Gets the TermAttributeSetDescriptor to be used to set the amount of information retrieved with the terms returned by a search.
 int getLimit()
          Gets the maximum number of DTS search results that should be returned from a search.
 int getNamespaceId()
          Gets the ID of the namespace to search in.
 void setAttributeSetDescriptor(TermAttributeSetDescriptor asd)
          Sets the TermAttributeSetDescriptor to be used to set the amount of information retrieved with the terms returned by a search.
 void setLimit(int limit)
          Sets the maximum number of DTS search results that should be returned from a search.
 void setNamespaceId(int namespaceId)
          Sets the ID of the namespace to search in.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALL_NAMESPACES

public static final int ALL_NAMESPACES
Indicates that all namespaces are to be searched.

See Also:
Constant Field Values

MAXIMUM_LIMIT

public static final int MAXIMUM_LIMIT
Indicates maximum number of matches that can be returned.

See Also:
Integer.MAX_VALUE, Constant Field Values

DEFAULT_LIMIT

public static final int DEFAULT_LIMIT
Indicates MAXIMUM_LIMIT limit on the number of matches returned as default.

See Also:
Constant Field Values
Constructor Detail

TermSearchOptions

public TermSearchOptions()
The default constructor.


TermSearchOptions

public TermSearchOptions(int searchLimit,
                         int namespaceId,
                         TermAttributeSetDescriptor asd)
Convenience constructor for setting all options at once.

Parameters:
searchLimit - limit on search results
namespaceId - Namespace ID to search in
asd - the TermAttributeSetDescriptor describing the desired attributes to be retrieved with the search result terms

TermSearchOptions

public TermSearchOptions(int searchLimit,
                         int namespaceId)
Convenience constructor for setting the most popular options. No attributes will be returned with the search result terms.

Parameters:
searchLimit - limit on search results
namespaceId - Namespace ID to search in
Method Detail

setLimit

public void setLimit(int limit)
Sets the maximum number of DTS search results that should be returned from a search.

Parameters:
limit - the search limit

getLimit

public int getLimit()
Gets the maximum number of DTS search results that should be returned from a search.

Returns:
the maximum number of results that should be returned from a search.

setNamespaceId

public void setNamespaceId(int namespaceId)
Sets the ID of the namespace to search in. Use ALL_NAMESPACES to search all namespaces.

Parameters:
namespaceId - Namespace ID to search in

getNamespaceId

public int getNamespaceId()
Gets the ID of the namespace to search in. A value of ALL_NAMESPACES indicates all namespaces are to be searched.

Returns:
the ID of the namespace to search in, or the value ALL_NAMESPACES.

setAttributeSetDescriptor

public void setAttributeSetDescriptor(TermAttributeSetDescriptor asd)
Sets the TermAttributeSetDescriptor to be used to set the amount of information retrieved with the terms returned by a search.

Parameters:
asd - the TermAttributeSetDescriptor describing the desired attributes to be retrieved

getAttributeSetDescriptor

public TermAttributeSetDescriptor getAttributeSetDescriptor()
Gets the TermAttributeSetDescriptor to be used to set the amount of information retrieved with the terms returned by a search.

Returns:
the TermAttributeSetDescriptor to be used to be used in retrieving the search result terms.


Copyright © 2011. All Rights Reserved.