com.apelon.dts.client.concept
Class NavQuery

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.concept.BaseConceptQuery
                  extended by com.apelon.dts.client.concept.BaseOntylogConceptQuery
                      extended by com.apelon.dts.client.concept.NavQuery

public abstract class NavQuery
extends BaseOntylogConceptQuery

The NavQuery class provides navigation over the Ontylog concept hierarchy. Ontylog concepts reside in an externally defined namespace, provided by subscription from Apelon, or loaded from a TDE or existing DTS 2.4 database.

Copyright: Copyright (c) 2007

Company: Apelon, Inc.

Since:
DTS 3.3.0
Version:
DTS 3.4.1
Author:
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 NavQuery createInstance(ServerConnection sc)
          Creates an instance of NavQuery.
static NavQuery createInstance(ServerConnection sc, boolean isValidating)
          Creates an instance of NavQuery.
 ArrayList filterSubsetConcepts(int subsetId, int namespaceId, DTSConcept[] concepts)
          This filters concepts which are present in the given subset which are present in the given namespace from a list of provided concept ids.
 ConceptChild[] getConceptChildRoots(ConceptAttributeSetDescriptor dtsAsd, int namespaceId)
          Convenience method for getting root ConceptChild objects in an Ontylog namespace.
 ConceptChild[] getConceptChildRoots(ConceptAttributeSetDescriptor dtsAsd, Namespace namespace)
          Convenience method for getting root ConceptChild objects for an Ontylog or Ontylog Extension namespace.
 NavChildContext getNavChildContext(DTSConcept focusConcept, ConceptAttributeSetDescriptor focusConceptASD, AssociationType associationType)
          Get the children of a concept with respect to an association type and whether they in turn have children in that same respect.
 NavChildContext getNavChildContext(DTSConcept focusConcept, ConceptAttributeSetDescriptor focusConceptASD, Namespace namespace)
          Get the subconcepts of an DTSConcept concept in an Ontylog or Ontylog Extension namespace and whether they in turn have subconcepts (children).
 NavChildContext getNavChildContext(OntylogConcept focusConcept, ConceptAttributeSetDescriptor focusConceptASD)
          Get the subconcepts of an Ontylog concept and whether they in turn have subconcepts (children).
 NavChildContext getNavChildContext(OntylogConcept concept, ConceptAttributeSetDescriptor dtsAsd, AssociationType associationType)
          Deprecated. As of DTS 3.4 Use getNavChildContext(DTSConcept, ConceptAttributeSetDescriptor, com.apelon.dts.client.association.AssociationType)
 NavParentContext getNavParentContext(DTSConcept focusConcept, ConceptAttributeSetDescriptor focusConceptASD, AssociationType associationType)
          Get the parents of a concept with respect to an association type and whether they in turn have parents in that same respect.
 NavParentContext getNavParentContext(DTSConcept focusConcept, ConceptAttributeSetDescriptor focusConceptASD, Namespace namespace)
          Get the superconcepts of an Ontylog or Ontylog Extension concept and whether they in turn have superconcepts (parents).
 NavParentContext getNavParentContext(OntylogConcept focusConcept, ConceptAttributeSetDescriptor focusConceptASD)
          Get the superconcepts of an Ontylog concept and whether they in turn have superconcepts (parents).
 NavParentContext getNavParentContext(OntylogConcept concept, ConceptAttributeSetDescriptor dtsAsd, AssociationType associationType)
          Deprecated. As of DTS 3.4 use getNavParentContext(DTSConcept, ConceptAttributeSetDescriptor, com.apelon.dts.client.association.AssociationType)
 ConceptChild[] getSubsetConceptChildRoots(ConceptAttributeSetDescriptor dtsAsd, Namespace namespace, int subsetId)
          Convenience method for getting root ConceptChild objects in an Ontylog or an Ontylog Extension namespace which are present in the given subset.
 NavChildContext getSubsetNavChildContext(OntylogConcept focusConcept, int subsetId, Namespace namespace, ConceptAttributeSetDescriptor focusConceptASD)
          Get the subconcepts of an Ontylog concept present in a given subset and whether they in turn have subconcepts (children).
 NavParentContext getSubsetNavParentContext(OntylogConcept focusConcept, int subsetId, Namespace namespace, ConceptAttributeSetDescriptor focusConceptASD)
          Get the superconcepts of an Ontylog concept present in the given subset and whether they in turn have superconcepts (parents).
 
Methods inherited from class com.apelon.dts.client.concept.BaseOntylogConceptQuery
addRoleType, assertIsNotNull, deleteRoleType, deleteRoleType, fetchParentReferences, fetchRightIdentityReferences, findRoleTypeByCode, findRoleTypeById, findRoleTypeByName, getAllKinds, getAllRoleTypes, getKinds, getResponse, getRoleTypes, isRoleTypeUsed, updateRoleType
 
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.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 NavQuery createInstance(ServerConnection sc)
                               throws IllegalArgumentException
Creates an instance of NavQuery. 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 NavQuery: If you're using a JDBC connection, you'll need to add something like the following lines:
  ServerConnectionJDBC scJDBC = new ServerConnectionJDBC(user, password,
    host, port, instance);
  NavQuery navQuery = NavQuery.createInstance(scJDBC);
  scJDBC.setQueryServer(com.apelon.dts.server.NavQueryServer.class,
    DTSHeader.NAVSERVER_HEADER);
  scJDBC.setQueryServer(com.apelon.dts.server.NamespaceServer.class,
    DTSHeader.NAMESPACESERVER_HEADER);
 

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

createInstance

public static NavQuery createInstance(ServerConnection sc,
                                      boolean isValidating)
                               throws IllegalArgumentException
Creates an instance of NavQuery. 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 NavQuery: If you're using a JDBC connection, you'll need to add something like the following lines:
  ServerConnectionJDBC scJDBC = new ServerConnectionJDBC(user, password,
    host, port, instance);
  NavQuery navQuery = NavQuery.createInstance(scJDBC, true);
  scJDBC.setQueryServer(com.apelon.dts.server.NavQueryServer.class,
    DTSHeader.NAVSERVER_HEADER);
  scJDBC.setQueryServer(com.apelon.dts.server.NamespaceServer.class,
    DTSHeader.NAMESPACESERVER_HEADER);
 

Parameters:
sc - the server connection
isValidating - true if XML needs to be validated, false otherwise.
Returns:
the created NavQuery
Throws:
IllegalArgumentException - if a null server connection is passed
See Also:
ServerConnectionJDBC, ServerConnectionSocket, ServerConnectionSecureSocket

getNavChildContext

public NavChildContext getNavChildContext(OntylogConcept focusConcept,
                                          ConceptAttributeSetDescriptor focusConceptASD)
                                   throws DTSException
Get the subconcepts of an Ontylog concept and whether they in turn have subconcepts (children).

Parameters:
focusConcept - the focus concept
focusConceptASD - the ConceptAttributeSetDescriptor that specifies which attributes to fill in for the focus concept of the NavChildContext
Returns:
navigation child context
Throws:
DTSException - if any error occurs in the method

getSubsetNavChildContext

public NavChildContext getSubsetNavChildContext(OntylogConcept focusConcept,
                                                int subsetId,
                                                Namespace namespace,
                                                ConceptAttributeSetDescriptor focusConceptASD)
                                         throws DTSException
Get the subconcepts of an Ontylog concept present in a given subset and whether they in turn have subconcepts (children).

Parameters:
focusConcept - the focus concept
subsetId - the subset id
namespace - the Namespace in which to find the root concepts, returns the roots of both Ontylog and subscription Thesaurus Namespaces; Thesaurus Namespace are not supported.
focusConceptASD - the ConceptAttributeSetDescriptor that specifies which attributes to fill in for the focus concept
Returns:
navigation child context
Throws:
DTSException - if any error occurs in the method
Since:
DTS3.4.0

getNavChildContext

public NavChildContext getNavChildContext(OntylogConcept concept,
                                          ConceptAttributeSetDescriptor dtsAsd,
                                          AssociationType associationType)
                                   throws DTSException
Deprecated. As of DTS 3.4 Use getNavChildContext(DTSConcept, ConceptAttributeSetDescriptor, com.apelon.dts.client.association.AssociationType)

Get the children of a concept with respect to an association type and whether they in turn have children in that same respect.

Parameters:
concept - the focus concept
dtsAsd - the ConceptAttributeSetDescriptor that specifies which attributes to fill in for the focus concept of the NavChildContext
associationType - association type for determining the context
Returns:
navigation child context
Throws:
DTSException - if any error occurs in the method

getNavChildContext

public NavChildContext getNavChildContext(DTSConcept focusConcept,
                                          ConceptAttributeSetDescriptor focusConceptASD,
                                          AssociationType associationType)
                                   throws DTSException
Get the children of a concept with respect to an association type and whether they in turn have children in that same respect.

Parameters:
focusConcept - the focus concept
focusConceptASD - the ConceptAttributeSetDescriptor that specifies which attributes to fill in for the focus concept of the NavChildContext
associationType - association type for determining the context
Returns:
navigation child context
Throws:
DTSException - if any error occurs in the method

getNavParentContext

public NavParentContext getNavParentContext(OntylogConcept focusConcept,
                                            ConceptAttributeSetDescriptor focusConceptASD)
                                     throws DTSException
Get the superconcepts of an Ontylog concept and whether they in turn have superconcepts (parents).

Parameters:
focusConcept - the focus concept
focusConceptASD - the ConceptAttributeSetDescriptor that specifies which attributes to fill in for the focus concept of the NavParentContext
Returns:
navigation parent context
Throws:
DTSException - if any error occurs in the method

getSubsetNavParentContext

public NavParentContext getSubsetNavParentContext(OntylogConcept focusConcept,
                                                  int subsetId,
                                                  Namespace namespace,
                                                  ConceptAttributeSetDescriptor focusConceptASD)
                                           throws DTSException
Get the superconcepts of an Ontylog concept present in the given subset and whether they in turn have superconcepts (parents).

Parameters:
focusConcept - the focus concept
subsetId - the subset id
namespace - the Namespace in which to find the root concepts, returns the roots of both Ontylog and subscription Thesaurus Namespaces; Thesaurus Namespace are not supported.
focusConceptASD - the ConceptAttributeSetDescriptor that specifies which attributes to fill in for the focus concept
Returns:
navigation parent context
Throws:
DTSException - if any error occurs in the method
Since:
DTS3.4.0

getNavParentContext

public NavParentContext getNavParentContext(OntylogConcept concept,
                                            ConceptAttributeSetDescriptor dtsAsd,
                                            AssociationType associationType)
                                     throws DTSException
Deprecated. As of DTS 3.4 use getNavParentContext(DTSConcept, ConceptAttributeSetDescriptor, com.apelon.dts.client.association.AssociationType)

Get the parents of a concept with respect to an association type and whether they in turn have parents in that same respect.

Parameters:
concept - the focus concept
dtsAsd - the ConceptAttributeSetDescriptor that specifies which attributes to fill in for the focus concept of the NavParentContext
associationType - association type for determining the context
Returns:
navigation parent context
Throws:
DTSException - if any error occurs in the method

getNavParentContext

public NavParentContext getNavParentContext(DTSConcept focusConcept,
                                            ConceptAttributeSetDescriptor focusConceptASD,
                                            AssociationType associationType)
                                     throws DTSException
Get the parents of a concept with respect to an association type and whether they in turn have parents in that same respect.

Parameters:
focusConcept - the focus concept
focusConceptASD - the ConceptAttributeSetDescriptor that specifies which attributes to fill in for the focus concept of the NavParentContext
associationType - association type for determining the context
Returns:
navigation parent context
Throws:
DTSException - if any error occurs in the method

getConceptChildRoots

public ConceptChild[] getConceptChildRoots(ConceptAttributeSetDescriptor dtsAsd,
                                           int namespaceId)
                                    throws DTSException
Convenience method for getting root ConceptChild objects in an Ontylog namespace. The root concepts have no superconcepts. Although the return type of this method is a ConceptChild concepts considered a root from Thesaurus namespaces will be returned if the namespace id from a Thesaurus namespace is provided. It is assumed that the caller will know the association type to use with the root returned if he or she desires to use the NavQuery to navigate concepts. Further, the ConceptChild will not indicate that there are any children available in the case of the Thesaurus namespace because there is currently no notion of a superconcept or subconcept in a Thesaurus namespace. Instead it is assumed that an association will be used to navigate concepts.

Parameters:
dtsAsd - the ConceptAttributeSetDescriptor that specifies which attributes to fill in for the ConceptChild concept
namespaceId - ID of namespace in which to find the root concepts, returns the roots of both Ontylog and subscription Thesaurus Namespaces; in the case of the Thesaurus Namespace, to create a heirarchy the association type must be known getNavChildContext(DTSConcept, ConceptAttributeSetDescriptor, AssociationType).
Returns:
array of ChildConcept objects which hold the root concepts
Throws:
DTSException - if any error occurs in the method

getSubsetConceptChildRoots

public ConceptChild[] getSubsetConceptChildRoots(ConceptAttributeSetDescriptor dtsAsd,
                                                 Namespace namespace,
                                                 int subsetId)
                                          throws DTSException
Convenience method for getting root ConceptChild objects in an Ontylog or an Ontylog Extension namespace which are present in the given subset. The root concepts have no superconcepts. Note: Thesaurus Namespace are not supported in the method.

Parameters:
dtsAsd - the ConceptAttributeSetDescriptor that specifies which attributes to fill in for the ConceptChild concept
namespace - the Namespace in which to find the root concepts, returns the roots of both Ontylog and subscription Thesaurus Namespaces; Thesaurus Namespace are not supported.
subsetId - The ID of the subset which has the above root concepts
Returns:
array of ChildConcept objects which hold the root concepts
Throws:
DTSException - if any error occurs in the method
Since:
DTS3.4.0

getNavChildContext

public NavChildContext getNavChildContext(DTSConcept focusConcept,
                                          ConceptAttributeSetDescriptor focusConceptASD,
                                          Namespace namespace)
                                   throws DTSException
Get the subconcepts of an DTSConcept concept in an Ontylog or Ontylog Extension namespace and whether they in turn have subconcepts (children). For concepts in extension namespace both subconcepts within the extension namespace and its linked subscription namespace are retrieved.

Parameters:
focusConcept - the focus concept
focusConceptASD - the ConceptAttributeSetDescriptor that specifies which attributes to fill in for the focus concept of the NavChildContext
namespace - Ontylog Extension namespace type for which the subsconcepts are to be retreived.
Returns:
navigation child context
Throws:
DTSException - if null DTSConcept or ConceptAttributeSetDescriptor or Namespace argument is passed or if any namespace type other than Ontylog or Ontylog Extension is passed
Since:
DTS 3.3

getNavParentContext

public NavParentContext getNavParentContext(DTSConcept focusConcept,
                                            ConceptAttributeSetDescriptor focusConceptASD,
                                            Namespace namespace)
                                     throws DTSException
Get the superconcepts of an Ontylog or Ontylog Extension concept and whether they in turn have superconcepts (parents). For Ontylog Extension concepts both superconcepts in the extension namespace and its linked subscription namespace are retrieved.

Parameters:
focusConcept - the focus concept
focusConceptASD - the ConceptAttributeSetDescriptor that specifies which attributes to fill in for the focus concept of the NavParentContext
namespace - Ontylog Extension type namespace for which the superconcepts are to be retreived.
Returns:
navigation parent context
Throws:
DTSException - if null DTSConcept or ConceptAttributeSetDescriptor or Namespace argument is passed or if any namespace type other than Ontylog or Ontylog Extension is passed
Since:
DTS 3.3

getConceptChildRoots

public ConceptChild[] getConceptChildRoots(ConceptAttributeSetDescriptor dtsAsd,
                                           Namespace namespace)
                                    throws DTSException
Convenience method for getting root ConceptChild objects for an Ontylog or Ontylog Extension namespace.

Parameters:
dtsAsd - the ConceptAttributeSetDescriptor that specifies which attributes to fill in for the ConceptChild concept
namespace - Ontylog Extension type namespace for which the roots are to be retreived.
Returns:
array of ChildConcept objects which hold the root concepts
Throws:
DTSException - if null ConceptAttributeSetDescriptor or Namespace argument is passed or if any namespace type other than Ontylog or Ontylog Extension is passed
Since:
DTS 3.3

filterSubsetConcepts

public ArrayList filterSubsetConcepts(int subsetId,
                                      int namespaceId,
                                      DTSConcept[] concepts)
                               throws DTSException
This filters concepts which are present in the given subset which are present in the given namespace from a list of provided concept ids.

Parameters:
subsetId - The subset id
namespaceId - The namespace id for which the filtering is based
concepts - An array of DTSConcept to be filtered based on above namespace id and subset id
Returns:
an ArrayList of DTSConcept from the provided concept array which are present in the subset
Throws:
DTSException
Since:
DTS3.4.0


Copyright © 2011. All Rights Reserved.