com.apelon.dts.client.term
Class TermSearchQuery

java.lang.Object
  extended by com.apelon.apelonserver.client.BasicQuery
      extended by com.apelon.dts.client.attribute.QualifierTypeQuery
          extended by com.apelon.dts.client.attribute.PropertyTypeQuery
              extended by com.apelon.dts.client.term.BaseTermQuery
                  extended by com.apelon.dts.client.term.TermSearchQuery

public abstract class TermSearchQuery
extends BaseTermQuery

TermSearchQuery provides search methods for searching terms.

Copyright: Copyright (c) 2003

Company: Apelon, Inc.

Version:
DTS 3.0.0
Author:
Apelon, Inc.

Field Summary
 
Fields inherited from class com.apelon.dts.client.term.BaseTermQuery
termListener
 
Fields inherited from class com.apelon.dts.client.attribute.QualifierTypeQuery
kbtypeListener
 
Fields inherited from class com.apelon.apelonserver.client.BasicQuery
ADMIN, queryHeader
 
Method Summary
static TermSearchQuery createInstance(ServerConnection sc)
          Creates an instance of TermSearchQuery.
static TermSearchQuery createInstance(ServerConnection sc, boolean isValidating)
          Creates an instance of TermSearchQuery.
 Term[] findTermsWithInverseTermAssociationMatching(AssociationType termAssocType, String fromTermName, TermSearchOptions options)
          Finds terms with Term Association having given Term Association Type and matching From Term name pattern.
 Term[] findTermsWithNameMatching(String pattern, TermSearchOptions options)
          Retrieves each term with a name (string identifier) that matches the argument pattern, based on the specified search options.
 Term[] findTermsWithPropertyMatching(DTSPropertyType propType, String pattern, TermSearchOptions options)
          Finds terms with Property having given Property Type and matching value pattern.
 Term[] findTermsWithTermAssociationMatching(AssociationType termAssocType, String toTermName, TermSearchOptions options)
          Finds terms with Term Association having given Term Association Type and matching To Term name pattern.
 
Methods inherited from class com.apelon.dts.client.term.BaseTermQuery
addProperty, addTerm, addTermListener, deleteProperty, deleteTerm, fetchProperties, findTermByCode, findTermById, findTermsByName, fireTermAction, getAllTermPropertyTypes, getTermListener, getTermPropertyTypes, removeTermListener, updateProperty, updateTerm
 
Methods inherited from class com.apelon.dts.client.attribute.PropertyTypeQuery
addPropertyType, buildPropertyTypes, deletePropertyType, findPropertyTypeByCode, findPropertyTypeById, findPropertyTypeByName, isPropertyTypeUsed, updatePropertyType
 
Methods inherited from class com.apelon.dts.client.attribute.QualifierTypeQuery
addKBTypeListener, addQualifierType, deleteQualifierType, findQualifierTypeByCode, findQualifierTypeById, findQualifierTypeByName, fireKBTypeAction, getAllConceptAssociationQualifierTypes, getAllConceptPropertyQualifierTypes, getAllQualifierTypes, getAllTermAssociationQualifierTypes, getAllTermPropertyQualifierTypes, getConceptAssociationQualifierTypes, getConceptPropertyQualifierTypes, getKBTypeListener, getTermAssociationQualifierTypes, getTermPropertyQualifierTypes, removeKBTypeListener, updateQualifierType
 
Methods inherited from class com.apelon.apelonserver.client.BasicQuery
executeQuery, executeQueryNoParse, getServerConnection, initializeDtds, initializeDtds, ping, setVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createInstance

public static TermSearchQuery createInstance(ServerConnection sc)
                                      throws IllegalArgumentException
Creates an instance of TermSearchQuery.
Depending on the type of ServerConnection object passed in the argument, the server may be local (JDBC), socket, or another implementation.

Parameters:
sc - the type of server connection
Returns:
the created TermSearchQuery
Throws:
IllegalArgumentException - if a null server connection is passed
See Also:
ServerConnectionJDBC, ServerConnectionSocket

createInstance

public static TermSearchQuery createInstance(ServerConnection sc,
                                             boolean isValidating)
                                      throws IllegalArgumentException
Creates an instance of TermSearchQuery.
Depending on the type of ServerConnection object passed in the argument, the server may be local(JDBC), socket, or another implementation.
The second argument is a boolean value for xml validation.

Parameters:
sc - the type of server connection
isValidating - a boolean value. It is true if xml needs to be validated, otherwise it is false.
Returns:
the created TermSearchQuery
Throws:
IllegalArgumentException - if a null server connection is passed
See Also:
ServerConnectionJDBC, ServerConnectionSocket

findTermsWithNameMatching

public Term[] findTermsWithNameMatching(String pattern,
                                        TermSearchOptions options)
                                 throws DTSException
Retrieves each term with a name (string identifier) that matches the argument pattern, based on the specified search options.

Parameters:
pattern - the term name pattern for searching
options - DTS search options such as search limit, namespace to search in, attributes to return with retrieved terms
Returns:
an array of Term objects with names that match the search pattern. An empty array is returned when there are no matches.
Throws:
DTSException - if any error occurs in the method

findTermsWithPropertyMatching

public Term[] findTermsWithPropertyMatching(DTSPropertyType propType,
                                            String pattern,
                                            TermSearchOptions options)
                                     throws DTSException
Finds terms with Property having given Property Type and matching value pattern.

Parameters:
propType - DTSPropertyType of the searchable Properties.
pattern - the term property value pattern for searching
options - Term search options such as search limit, namespace to search in, attributes to return with retrieved terms
Returns:
an array of term objects with a property value that matches the search pattern. An empty array is returned when there are no matches.
Throws:
DTSException - if any error occurs in the method

findTermsWithTermAssociationMatching

public Term[] findTermsWithTermAssociationMatching(AssociationType termAssocType,
                                                   String toTermName,
                                                   TermSearchOptions options)
                                            throws DTSException
Finds terms with Term Association having given Term Association Type and matching To Term name pattern.

Parameters:
termAssocType - term association type to search for
toTermName - the to term name pattern
options - Term search options such as search limit, namespace to search in, attributes to return with retrieved terms
Returns:
an array of from Terms with an association of the specified type where the to term matches the passed term name
Throws:
DTSException - if any error occurs in the method

findTermsWithInverseTermAssociationMatching

public Term[] findTermsWithInverseTermAssociationMatching(AssociationType termAssocType,
                                                          String fromTermName,
                                                          TermSearchOptions options)
                                                   throws DTSException
Finds terms with Term Association having given Term Association Type and matching From Term name pattern.

Parameters:
termAssocType - term association type to search for
fromTermName - the from term name pattern
options - Term search options such as search limit, namespace to search in, attributes to return with retrieved terms
Returns:
an array of to Terms in an association of the specified type where the from term matches the passed term name
Throws:
DTSException - if any error occurs in the method


Copyright © 2011. All Rights Reserved.