com.apelon.dts.client.term
Class TermAttributeSetDescriptor

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

public class TermAttributeSetDescriptor
extends Object

TermAttributeSetDescriptor is a description of the set of term attributes that should be retrieved by a given operation. A term attribute is either a DTSProperty or TermAssociation. Attributes are chosen by their particular type: DTSPropertyType or AssociationType.

A typical use of a TermAttributeSetDescriptor by an application program would be to specify the set of term attributes to be retrieved for the application under different circumstances. A fuller or smaller set of attributes may be desired in different cases.

Copyright: Copyright (c) 2007

Company: Apelon, Inc.

Since:
DTS 3.0.0
Version:
DTS 3.4.1
Author:
Apelon, Inc.

Field Summary
static TermAttributeSetDescriptor ALL_ATTRIBUTES
          ALL_ATTRIBUTES is a special TermAttributeSetDescriptor that will cause all attributes of a term to be fetched.
static int DEFAULT_LIMIT
          Default limit on number of attributes returned of each type.
static TermAttributeSetDescriptor NO_ATTRIBUTES
          NO_ATTRIBUTES is a special TermAttributeSetDescriptor that will cause no attributes of a term to be fetched.
 
Constructor Summary
TermAttributeSetDescriptor(String name)
          Constructs a TermAttributeSetDescriptor with the given name and no attributes.
TermAttributeSetDescriptor(String name, int attributesLimit)
          Constructs a TermAttributeSetDescriptor with the given name and attribute results limit, but no attributes.
 
Method Summary
 boolean addInverseTermAssociationType(AssociationType invTermAssocType)
          Adds an inverse term association type to the set of association types that will be retrieved by any operation that uses this TermAttributeSetDescriptor.
 boolean addPropertyType(DTSPropertyType propertyType)
          Adds a property type to the set of property types that will be retrieved by any operation that uses this TermAttributeSetDescriptor.
 boolean addSynonymType(AssociationType synonymType)
          Adds a synonym type to the set of synonym types that will be retrieved by any operation that uses this TermAttributeSetDescriptor.
 boolean addTermAssociationType(AssociationType termAssocType)
          Adds a term association type to the set of association types that will be retrieved by any operation that uses this TermAttributeSetDescriptor.
 boolean containsInverseTermAssociationType(AssociationType invTermAssocType)
          Tests if this TermAttributeSetDescriptor contains the inverse term AssociationType argument.
 boolean containsPropertyType(DTSPropertyType propertyType)
          Tests if this TermAttributeSetDescriptor contains the DTSPropertyType argument.
 boolean containsSynonymType(AssociationType synonymType)
          Tests if this TermAttributeSetDescriptor contains the synonym AssociationType argument.
 boolean containsTermAssociationType(AssociationType termAssocType)
          Tests if this TermAttributeSetDescriptor contains the term AssociationType argument.
 boolean getAllInverseTermAssociationTypes()
          Retrieve whether all inverse term association types are included in this TermAttributeSetDescriptor.
 boolean getAllPropertyTypes()
          Retrieve whether all property types are included in this TermAttributeSetDescriptor.
 boolean getAllSynonymTypes()
          Retrieve whether all synonym types are included in this TermAttributeSetDescriptor.
 boolean getAllTermAssociationTypes()
          Retrieve whether all term association types are included in this TermAttributeSetDescriptor.
 int getAttributesLimit()
          Retrieve limit on number of attributes returned of each type.
 AssociationType[] getInverseTermAssociationTypes()
          Gets the set of inverse term association types that will be retrieved by any operation that uses this TermAttributeSetDescriptor.
 String getName()
          Gets the name of the TermAttributeSetDescriptor.
 DTSPropertyType[] getPropertyTypes()
          Gets the set of property types that will be retrieved by any operation that uses this TermAttributeSetDescriptor.
 AssociationType[] getSynonymTypes()
          Gets the set of synonym types that will be retrieved by any operation that uses this TermAttributeSetDescriptor.
 AssociationType[] getTermAssociationTypes()
          Gets the set of term association types that will be retrieved by any operation that uses this TermAttributeSetDescriptor.
 boolean removeInverseTermAssociationType(AssociationType invTermAssocType)
          Removes the inverse term association type from the TermAttributeSetDescriptor.
 boolean removePropertyType(DTSPropertyType propertyType)
          Removes the property type from the TermAttributeSetDescriptor.
 boolean removeSynonymType(AssociationType synonymType)
          Removes the synonym type from the TermAttributeSetDescriptor.
 boolean removeTermAssociationType(AssociationType termAssocType)
          Removes the association type from the TermAttributeSetDescriptor.
 void setAllInverseTermAssociationTypes(boolean allInverseTermAssociationTypes)
          Set whether all inverse term association types are included in this TermAttributeSetDescriptor.
 void setAllPropertyTypes(boolean allPropertyTypes)
          Set whether all property types are included in this TermAttributeSetDescriptor.
 void setAllSynonymTypes(boolean allSynonymTypes)
          Set whether all synonym types are included in this TermAttributeSetDescriptor.
 void setAllTermAssociationTypes(boolean allTermAssociationTypes)
          Set whether all term association types are included in this TermAttributeSetDescriptor.
 void setAttributesLimit(int limit)
          Set the limit on number of attributes returned of each type.
 void setInverseTermAssociationTypes(AssociationType[] invTermAssocTypes)
          Sets the inverse term association types to be retrieved by any operation that uses this TermAttributeSetDescriptor.
 void setName(String name)
          Sets the name of the TermAttributeSetDescriptor.
 void setPropertyTypes(DTSPropertyType[] propertyTypes)
          Sets the set of property types that will be retrieved by any operation that uses this TermAttributeSetDescriptor.
 void setSynonymTypes(AssociationType[] synonymTypes)
          Sets the synonym types to be retrieved by any operation that uses this TermAttributeSetDescriptor.
 void setTermAssociationTypes(AssociationType[] termAssocTypes)
          Sets the term association types to be retrieved by any operation that uses this TermAttributeSetDescriptor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALL_ATTRIBUTES

public static final TermAttributeSetDescriptor ALL_ATTRIBUTES
ALL_ATTRIBUTES is a special TermAttributeSetDescriptor that will cause all attributes of a term to be fetched. Do not attempt to modify this static object.


NO_ATTRIBUTES

public static final TermAttributeSetDescriptor NO_ATTRIBUTES
NO_ATTRIBUTES is a special TermAttributeSetDescriptor that will cause no attributes of a term to be fetched. Do not attempt to modify this static object.


DEFAULT_LIMIT

public static final int DEFAULT_LIMIT
Default limit on number of attributes returned of each type.

See Also:
Constant Field Values
Constructor Detail

TermAttributeSetDescriptor

public TermAttributeSetDescriptor(String name)
Constructs a TermAttributeSetDescriptor with the given name and no attributes. Use set and add methods to add desired attributes, or remove methods to subsequently modify the desired attributes.

Sets the attribute limit to DEFAULT_LIMIT.

Parameters:
name - the name of the TermAttributeSetDescriptor

TermAttributeSetDescriptor

public TermAttributeSetDescriptor(String name,
                                  int attributesLimit)
Constructs a TermAttributeSetDescriptor with the given name and attribute results limit, but no attributes. Use set and add methods to add desired attributes, or remove methods to subsequently modify the desired attributes.

Parameters:
name - the name of the TermAttributeSetDescriptor
attributesLimit - limit on the number of attributes returned of each type
Method Detail

getName

public String getName()
Gets the name of the TermAttributeSetDescriptor.

Returns:
the name of the TermAttributeSetDescriptor instance.
Since:
DTS 3.4.1

setName

public void setName(String name)
Sets the name of the TermAttributeSetDescriptor.

Parameters:
name - new name of the TermAttributeSetDescriptor
Since:
DTS 3.4.1

setPropertyTypes

public void setPropertyTypes(DTSPropertyType[] propertyTypes)
Sets the set of property types that will be retrieved by any operation that uses this TermAttributeSetDescriptor. Any existing property types in the TermAttributeSetDescriptor are removed.

Parameters:
propertyTypes - the property types of the TermAttributeSetDescriptor

containsPropertyType

public boolean containsPropertyType(DTSPropertyType propertyType)
Tests if this TermAttributeSetDescriptor contains the DTSPropertyType argument.

Parameters:
propertyType - the property type used to test if it is contained in the TermAttributeSetDescriptor
Returns:
true if this TermAttributeSetDescriptor contains the DTSPropertyType argument, or else false

addPropertyType

public boolean addPropertyType(DTSPropertyType propertyType)
Adds a property type to the set of property types that will be retrieved by any operation that uses this TermAttributeSetDescriptor.

Parameters:
propertyType - the property type which is added
Returns:
false if the property type was already in the TermAttributeSetDescriptor, true if the property type was added

removePropertyType

public boolean removePropertyType(DTSPropertyType propertyType)
Removes the property type from the TermAttributeSetDescriptor.

Parameters:
propertyType - the property type which is removed
Returns:
true if removed successfully; otherwise false

getPropertyTypes

public DTSPropertyType[] getPropertyTypes()
Gets the set of property types that will be retrieved by any operation that uses this TermAttributeSetDescriptor.

Returns:
an array of property types

setAllPropertyTypes

public void setAllPropertyTypes(boolean allPropertyTypes)
Set whether all property types are included in this TermAttributeSetDescriptor.

Parameters:
allPropertyTypes - true if all property types are included; false otherwise.

getAllPropertyTypes

public boolean getAllPropertyTypes()
Retrieve whether all property types are included in this TermAttributeSetDescriptor.

Returns:
boolean indicating whether all property types are included.

setTermAssociationTypes

public void setTermAssociationTypes(AssociationType[] termAssocTypes)
Sets the term association types to be retrieved by any operation that uses this TermAttributeSetDescriptor. Any existing term association types in the TermAttributeSetDescriptor are removed.

Parameters:
termAssocTypes - term association types to be retrieved

containsTermAssociationType

public boolean containsTermAssociationType(AssociationType termAssocType)
Tests if this TermAttributeSetDescriptor contains the term AssociationType argument.

Parameters:
termAssocType - the term association type used to test if it is contained in the TermAttributeSetDescriptor
Returns:
true if this TermAttributeSetDescriptor contains the term AssociationType argument; otherwise false

addTermAssociationType

public boolean addTermAssociationType(AssociationType termAssocType)
Adds a term association type to the set of association types that will be retrieved by any operation that uses this TermAttributeSetDescriptor.

Parameters:
termAssocType - the term association type which is added
Returns:
false if the association type was already in the TermAttributeSetDescriptor; true if the association type was added

removeTermAssociationType

public boolean removeTermAssociationType(AssociationType termAssocType)
Removes the association type from the TermAttributeSetDescriptor.

Parameters:
termAssocType - the term association type to be removed
Returns:
true if removed successfully; otherwise false

getTermAssociationTypes

public AssociationType[] getTermAssociationTypes()
Gets the set of term association types that will be retrieved by any operation that uses this TermAttributeSetDescriptor.

Returns:
an array of term association types

setAllTermAssociationTypes

public void setAllTermAssociationTypes(boolean allTermAssociationTypes)
Set whether all term association types are included in this TermAttributeSetDescriptor.

Parameters:
allTermAssociationTypes - true if all term association types are included; false otherwise.

getAllTermAssociationTypes

public boolean getAllTermAssociationTypes()
Retrieve whether all term association types are included in this TermAttributeSetDescriptor.

Returns:
boolean indicating whether all term association types are included.

setInverseTermAssociationTypes

public void setInverseTermAssociationTypes(AssociationType[] invTermAssocTypes)
Sets the inverse term association types to be retrieved by any operation that uses this TermAttributeSetDescriptor. Any existing inverse term association types in the TermAttributeSetDescriptor are removed.

Parameters:
invTermAssocTypes - inverse term association types to be retrieved

containsInverseTermAssociationType

public boolean containsInverseTermAssociationType(AssociationType invTermAssocType)
Tests if this TermAttributeSetDescriptor contains the inverse term AssociationType argument.

Parameters:
invTermAssocType - the inverse term association type used to test if it is contained in the TermAttributeSetDescriptor
Returns:
true if this TermAttributeSetDescriptor contains the term AssociationType argument; otherwise false

addInverseTermAssociationType

public boolean addInverseTermAssociationType(AssociationType invTermAssocType)
Adds an inverse term association type to the set of association types that will be retrieved by any operation that uses this TermAttributeSetDescriptor.

Parameters:
invTermAssocType - the term association type which is added
Returns:
false if the association type was already in the TermAttributeSetDescriptor; true if the association type was added

removeInverseTermAssociationType

public boolean removeInverseTermAssociationType(AssociationType invTermAssocType)
Removes the inverse term association type from the TermAttributeSetDescriptor.

Parameters:
invTermAssocType - the inverse term association type to be removed
Returns:
true if removed successfully; otherwise false

getInverseTermAssociationTypes

public AssociationType[] getInverseTermAssociationTypes()
Gets the set of inverse term association types that will be retrieved by any operation that uses this TermAttributeSetDescriptor.

Returns:
an array of inverse term association types

setAllInverseTermAssociationTypes

public void setAllInverseTermAssociationTypes(boolean allInverseTermAssociationTypes)
Set whether all inverse term association types are included in this TermAttributeSetDescriptor.

Parameters:
allInverseTermAssociationTypes - true if all inverse term association types are included; false otherwise.

getAllInverseTermAssociationTypes

public boolean getAllInverseTermAssociationTypes()
Retrieve whether all inverse term association types are included in this TermAttributeSetDescriptor.

Returns:
boolean indicating whether all inverse term association types are included.

setSynonymTypes

public void setSynonymTypes(AssociationType[] synonymTypes)
Sets the synonym types to be retrieved by any operation that uses this TermAttributeSetDescriptor. Any existing synonym types in the TermAttributeSetDescriptor are removed.

Parameters:
synonymTypes - synonym types to be retrieved
Throws:
IllegalArgumentException - if the specified array is null.

containsSynonymType

public boolean containsSynonymType(AssociationType synonymType)
Tests if this TermAttributeSetDescriptor contains the synonym AssociationType argument.

Parameters:
synonymType - the synonym type used to test if it is contained in the TermAttributeSetDescriptor
Returns:
true if this TermAttributeSetDescriptor contains the AssociationType argument; otherwise false

addSynonymType

public boolean addSynonymType(AssociationType synonymType)
Adds a synonym type to the set of synonym types that will be retrieved by any operation that uses this TermAttributeSetDescriptor.

Parameters:
synonymType - the synonym type which is added
Returns:
false if the synonym type was already in the TermAttributeSetDescriptor; true if the synonym type was added

removeSynonymType

public boolean removeSynonymType(AssociationType synonymType)
Removes the synonym type from the TermAttributeSetDescriptor.

Parameters:
synonymType - the synonym type which is removed
Returns:
true if removed successfully; otherwise false

getSynonymTypes

public AssociationType[] getSynonymTypes()
Gets the set of synonym types that will be retrieved by any operation that uses this TermAttributeSetDescriptor.

Returns:
an array of synonym association types

setAllSynonymTypes

public void setAllSynonymTypes(boolean allSynonymTypes)
Set whether all synonym types are included in this TermAttributeSetDescriptor.

Parameters:
allSynonymTypes - true if all synonym types are included; false otherwise.

getAllSynonymTypes

public boolean getAllSynonymTypes()
Retrieve whether all synonym types are included in this TermAttributeSetDescriptor.

Returns:
boolean indicating whether all synonym types are included.

setAttributesLimit

public void setAttributesLimit(int limit)
Set the limit on number of attributes returned of each type.

Parameters:
limit - The limit on number of attributes returned of each type.

getAttributesLimit

public int getAttributesLimit()
Retrieve limit on number of attributes returned of each type.

Returns:
int A limit on number of attributes returned of each type.


Copyright © 2011. All Rights Reserved.