|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.apelon.apelonserver.client.BasicQuery com.apelon.dts.client.attribute.QualifierTypeQuery com.apelon.dts.client.attribute.PropertyTypeQuery com.apelon.dts.client.concept.BaseConceptQuery com.apelon.dts.client.concept.SearchQuery
public abstract class SearchQuery
An SearchQuery
provides search methods for searching thesaurus
or Ontylog concepts. Some methods only apply to Ontylog concepts.
Copyright: Copyright (c) 2003
Company: Apelon, Inc.
Field Summary |
---|
Fields inherited from class com.apelon.dts.client.concept.BaseConceptQuery |
---|
conceptListener |
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 SearchQuery |
createInstance(ServerConnection sc)
Creates an instance of SearchQuery . |
static SearchQuery |
createInstance(ServerConnection sc,
boolean isValidating)
Creates an instance of SearchQuery . |
OntylogConcept[] |
findConceptsWithConceptAssociationMatching(AssociationType conceptAssocType,
String toConceptName,
DTSSearchOptions options)
Gets all concepts with associations of the specified type whose target concept name is matched, based on the specified search options. |
OntylogConcept[] |
findConceptsWithConceptAssociationMatching(AssociationType conceptAssocType,
String toConceptName,
int subsetId,
int limit)
Gets all concepts with associations of the specified type whose target concept name is matched, based on the subset id and the max match limit. |
OntylogConcept[] |
findConceptsWithInverseConceptAssociationMatching(AssociationType invConceptAssocType,
String fromConceptName,
DTSSearchOptions options)
Gets all concepts in associations of the specified type whose source concept name is matched, based on the specified search options. |
OntylogConcept[] |
findConceptsWithInverseConceptAssociationMatching(AssociationType invConceptAssocType,
String fromConceptName,
int subsetId,
int limit)
Gets all concepts in associations of the specified type whose source concept name is matched, based on the subset provided. |
OntylogConcept[] |
findConceptsWithInverseRoleMatching(DTSRoleType roleType,
String pattern,
DTSSearchOptions options)
Retrieves each concept which is a value of a DTSRole with a
selected DTSRoleType , if the concept name having the role
matches the argument pattern. |
OntylogConcept[] |
findConceptsWithInverseRoleMatching(DTSRoleType roleType,
String pattern,
int subsetId,
int limit)
Retrieves each concept which is a value of a DTSRole with a
selected DTSRoleType in a subset (given by subset id),
if the concept name having the role matches the argument pattern. |
OntylogConcept[] |
findConceptsWithNameMatching(String pattern,
DTSSearchOptions options)
Retrieves each concepts with a name (string identifier) that matches the argument pattern, based on the specified search options. |
OntylogConcept[] |
findConceptsWithNameMatching(String pattern,
DTSSearchOptions options,
boolean synonyms)
Retrieves each concepts with a name (string identifier) that matches the argument pattern, based on the specified search options. |
OntylogConcept[] |
findConceptsWithNameMatching(String pattern,
int subsetId,
boolean synonyms,
int limit)
Retrieves each concepts with a name (string identifier) that matches the argument pattern, based on the specified subset id. |
OntylogConcept[] |
findConceptsWithPropertyContaining(DTSPropertyType propType,
String pattern,
DTSSearchOptions options)
Retrieves each concept with a selected DTSPropertyType, if the concept DTSPropertyType value contains the argument pattern. |
OntylogConcept[] |
findConceptsWithPropertyContaining(DTSPropertyType propType,
String pattern,
int subsetId,
int limit)
Retrieves each concept present in the subset with a selected DTSPropertyType, if the concept DTSPropertyType value contains the argument pattern. |
OntylogConcept[] |
findConceptsWithPropertyMatching(DTSPropertyType propType,
String pattern,
DTSSearchOptions options)
Retrieves each concept with a selected DTSPropertyType , if the concept
DTSPropertyType value matches the argument pattern. |
OntylogConcept[] |
findConceptsWithPropertyMatching(DTSPropertyType propType,
String pattern,
int subsetId,
int limit)
Retrieves each concept with a selected DTSPropertyType , if the concept
DTSPropertyType value matches the argument pattern. |
OntylogConcept[] |
findConceptsWithRoleMatching(DTSRoleType roleType,
String pattern,
DTSSearchOptions options)
Retrieves each concept with a selected DTSRoleType , if the
concept DTSRoleType value matches the argument pattern. |
OntylogConcept[] |
findConceptsWithRoleMatching(DTSRoleType roleType,
String pattern,
int subsetId,
int limit)
Retrieves each concept in the given subset with a selected DTSRoleType , if the
concept DTSRoleType value matches the argument pattern. |
OntylogConcept[] |
findConceptsWithSynonymMatching(AssociationType synonymType,
String synonymTermName,
DTSSearchOptions options)
Gets all concepts with synonyms of the specified type matching the synonym name, based on the specified search options. |
OntylogConcept[] |
findConceptsWithSynonymMatching(AssociationType synonymType,
String synonymTermName,
int subsetId,
int limit)
Gets all concepts with synonyms of the specified type matching the synonym name, based on the subset provided. |
Methods inherited from class com.apelon.dts.client.concept.BaseConceptQuery |
---|
addConceptListener, addProperty, addSynonym, deleteProperty, deleteSynonym, findConceptByCode, findConceptById, findConceptByName, findConceptsByCode, findConceptsById, findConceptsByName, fireConceptAction, getAllConceptPropertyTypes, getConceptListener, getConceptPropertyTypes, getNamespaceQuery, removeConceptListener, updateProperty, updateSynonym |
Methods inherited from class com.apelon.dts.client.attribute.PropertyTypeQuery |
---|
addPropertyType, buildPropertyTypes, deletePropertyType, findPropertyTypeByCode, findPropertyTypeById, findPropertyTypeByName, isPropertyTypeUsed, updatePropertyType |
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 |
---|
public static SearchQuery createInstance(ServerConnection sc) throws IllegalArgumentException
SearchQuery
. Depending on the type
of ServerConnection object passed in the argument, the server may be local
(JDBC), socket, or another implementation. When using a socket connection,
the Apelon DTS server must be configured with the following query servers
to support SearchQuery:
com.apelon.dts.server.SearchQueryServer
com.apelon.dts.server.NamespaceServer
com.apelon.dts.server.OntylogConceptServer
ServerConnectionJDBC scJDBC = new ServerConnectionJDBC(user, password, host, port, instance); SearchQuery searchQuery = SearchQuery.createInstance(scJDBC); scJDBC.setQueryServer(com.apelon.dts.server.SearchQueryServer.class, DTSHeader.SEARCHSERVER_HEADER); scJDBC.setQueryServer(com.apelon.dts.server.OntylogConceptServer.class, DTSHeader.ONTYLOGCONCEPTSERVER_HEADER);
sc
- the server connection
IllegalArgumentException
- if a null server connection is passedServerConnectionJDBC
,
ServerConnectionSocket
,
ServerConnectionSecureSocket
public static SearchQuery createInstance(ServerConnection sc, boolean isValidating) throws IllegalArgumentException
SearchQuery
. Depending on the
type of ServerConnection object passed in the first argument, the server
may be local (JDBC), socket, or another implementation. The second
argument is a boolean value for XML validation. When using a socket
connection, the Apelon DTS server must be configured with the following
query servers to support SearchQuery:
com.apelon.dts.server.SearchQueryServer
com.apelon.dts.server.NamespaceServer
com.apelon.dts.server.OntylogConceptServer
ServerConnectionJDBC scJDBC = new ServerConnectionJDBC(user, password, host, port, instance); SearchQuery searchQuery = SearchQuery.createInstance(scJDBC, true); scJDBC.setQueryServer(com.apelon.dts.server.SearchQueryServer.class, DTSHeader.SEARCHSERVER_HEADER); scJDBC.setQueryServer(com.apelon.dts.server.OntylogConceptServer.class, DTSHeader.ONTYLOGCONCEPTSERVER_HEADER);
sc
- the server connectionisValidating
- true
if XML needs to be
validated, false
otherwise.
IllegalArgumentException
- if a null server connection is passedServerConnectionJDBC
,
ServerConnectionSocket
,
ServerConnectionSecureSocket
public OntylogConcept[] findConceptsWithNameMatching(String pattern, DTSSearchOptions options) throws DTSException
pattern
- the concept name pattern for searchingoptions
- DTS search options such as search limit,
namespace to search in, attributes to return
with retrieved concepts
OntylogConcept
objects with names that
match the search pattern. An empty array is returned when
there are no matches.
DTSException
- if any error occurs in the methodpublic OntylogConcept[] findConceptsWithNameMatching(String pattern, DTSSearchOptions options, boolean synonyms) throws DTSException
pattern
- the concept name pattern for searchingoptions
- DTS search options such as search limit,
namespace to search in, attributes to return
with retrieved conceptssynonyms
- if true searches by synonym name and concept
name.
OntylogConcept
objects with names that
match the search pattern. An empty array is returned when
there are no matches.
DTSException
- if any error occurs in the methodpublic OntylogConcept[] findConceptsWithNameMatching(String pattern, int subsetId, boolean synonyms, int limit) throws DTSException
pattern
- the concept name pattern for searchingsubsetId
- the subsetId in which the search is to be donesynonyms
- if true searches by synonym name alongwith concept
name.limit
- the maximum limit on the number of concepts retreived
OntylogConcept
objects with names that
match the concepts in the given subset. An empty array is returned when
there are no matches.
DTSException
- if any error occurs in the methodpublic OntylogConcept[] findConceptsWithPropertyMatching(DTSPropertyType propType, String pattern, DTSSearchOptions options) throws DTSException
DTSPropertyType
, if the concept
DTSPropertyType value matches the argument pattern. DTSPropertyType of size
PropertyValueSize.INDEXABLE and PropertyValueSize.SEARCHABLE are supported only.
propType
- each returned concept should have this
DTSPropertyType.pattern
- the concept property value pattern for searchingoptions
- DTS search options such as search limit,
namespace to search in, attributes to return
with retrieved concepts
DTSException
- if any error occurs in the methodpublic OntylogConcept[] findConceptsWithPropertyMatching(DTSPropertyType propType, String pattern, int subsetId, int limit) throws DTSException
DTSPropertyType
, if the concept
DTSPropertyType value matches the argument pattern. DTSPropertyType of size PropertyValueSize.INDEXABLE and
PropertyValueSize.SEARCHABLE are supported only.
propType
- each returned concept should have this
DTSPropertyType.pattern
- the concept property value pattern for searchingsubsetId
- the subset idlimit
- number of maximum concept matches to be retreived
DTSException
- if any error occurs in the method or if the DTSPropertyType is
of size BIG ( PropertyValueSize
)public OntylogConcept[] findConceptsWithPropertyContaining(DTSPropertyType propType, String pattern, DTSSearchOptions options) throws DTSException
propType
- each returned concept should have this
DTSPropertyType.pattern
- the concept property value pattern for searchingoptions
- DTS search options such as search limit,
namespace to search in, attributes to return
with retrieved concepts
DTSException
- if any error occurs in the methodpublic OntylogConcept[] findConceptsWithPropertyContaining(DTSPropertyType propType, String pattern, int subsetId, int limit) throws DTSException
propType
- each returned concept should have this
DTSPropertyType.pattern
- the concept property value pattern for searchingsubsetId
- the subset idlimit
- number of maximum concept matches to be retreived
DTSException
- if any error occurs in the methodpublic OntylogConcept[] findConceptsWithRoleMatching(DTSRoleType roleType, String pattern, DTSSearchOptions options) throws DTSException
DTSRoleType
, if the
concept DTSRoleType value matches the argument pattern.
roleType
- Each returned concept should have a DTSRole
with this DTSRoleType.pattern
- the concept role value pattern for searchingoptions
- DTS search options such as search limit,
namespace to search in, attributes to return
with retrieved concepts
DTSException
- if any error occurs in the methodpublic OntylogConcept[] findConceptsWithRoleMatching(DTSRoleType roleType, String pattern, int subsetId, int limit) throws DTSException
DTSRoleType
, if the
concept DTSRoleType value matches the argument pattern.
roleType
- Each returned concept should have a DTSRole
with this DTSRoleType.pattern
- the concept role value pattern for searchingsubsetId
- the subset idlimit
- number of maximum concept matches to be retreived
DTSException
- if any error occurs in the methodpublic OntylogConcept[] findConceptsWithInverseRoleMatching(DTSRoleType roleType, String pattern, DTSSearchOptions options) throws DTSException
DTSRole
with a
selected DTSRoleType
, if the concept name having the role
matches the argument pattern.
roleType
- Each returned concept should be a value of a
DTSRole having this DTSRoleType.pattern
- the concept name pattern for searchingoptions
- DTS search options such as search limit,
namespace to search in, attributes to return
with retrieved concepts
DTSException
- if any error occurs in the methodpublic OntylogConcept[] findConceptsWithInverseRoleMatching(DTSRoleType roleType, String pattern, int subsetId, int limit) throws DTSException
DTSRole
with a
selected DTSRoleType
in a subset (given by subset id),
if the concept name having the role matches the argument pattern.
roleType
- Each returned concept should be a value of a
DTSRole having this DTSRoleType.pattern
- the concept name pattern for searchingsubsetId
- the subset idlimit
- number of maximum concept matches to be retreived
DTSException
- if any error occurs in the methodpublic OntylogConcept[] findConceptsWithConceptAssociationMatching(AssociationType conceptAssocType, String toConceptName, DTSSearchOptions options) throws DTSException
conceptAssocType
- concept association type to search fortoConceptName
- the to concept nameoptions
- DTS search options such as search limit,
namespace to search in, attributes to return
with retrieved concepts
OntylogConcept
s with an association
of the specified type where the to concept matches the passed
concept name
DTSException
- if any error occurs in the methodpublic OntylogConcept[] findConceptsWithConceptAssociationMatching(AssociationType conceptAssocType, String toConceptName, int subsetId, int limit) throws DTSException
conceptAssocType
- concept association type to search fortoConceptName
- the to concept namesubsetId
- the subset idlimit
- number of maximum concept matches to be retreived
OntylogConcept
s with an association
of the specified type where the to concept matches the passed
concept name
DTSException
- if any error occurs in the methodpublic OntylogConcept[] findConceptsWithInverseConceptAssociationMatching(AssociationType invConceptAssocType, String fromConceptName, DTSSearchOptions options) throws DTSException
invConceptAssocType
- concept association type to search forfromConceptName
- the from concept nameoptions
- DTS search options such as search limit,
namespace to search in, attributes to return
with retrieved concepts
OntylogConcept
s in an association of
the specified type where the from concept matches the passed
concept name
DTSException
- if any error occurs in the methodpublic OntylogConcept[] findConceptsWithInverseConceptAssociationMatching(AssociationType invConceptAssocType, String fromConceptName, int subsetId, int limit) throws DTSException
invConceptAssocType
- concept association type to search forfromConceptName
- the from concept namesubsetId
- the subset idlimit
- number of maximum concept matches to be retreived
OntylogConcept
s in an association of
the specified type where the from concept matches the passed
concept name
DTSException
- if any error occurs in the methodpublic OntylogConcept[] findConceptsWithSynonymMatching(AssociationType synonymType, String synonymTermName, DTSSearchOptions options) throws DTSException
synonymType
- synonym type to search forsynonymTermName
- the synonym nameoptions
- DTS search options such as search limit,
namespace to search in, attributes to return
with retrieved concepts
OntylogConcept
s with a synonym of the
specified type where the synonym name matches the passed string
DTSException
- if any error occurs in the methodpublic OntylogConcept[] findConceptsWithSynonymMatching(AssociationType synonymType, String synonymTermName, int subsetId, int limit) throws DTSException
synonymType
- synonym type to search forsynonymTermName
- the synonym namesubsetId
- the subset idlimit
- number of maximum concept matches to be retreived
OntylogConcept
s with a synonym of the
specified type where the synonym name matches the passed string
DTSException
- if any error occurs in the method
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |