org.nci.dts.client
Class ConceptHistoryServer

java.lang.Object
  |
  +--com.apelon.apelonserver.client.BasicQuery
        |
        +--org.nci.dts.client.ConceptHistoryServer

public abstract class ConceptHistoryServer
extends com.apelon.apelonserver.client.BasicQuery

A ConceptHistoryServer provides common methods for getting concept history. This class is the main class in org.nci.dts.client package.

Copyright: Copyright (c) 2002

Company: Apelon Inc.

Version:
DTS 3.0
Author:
Apelon Inc.

Constructor Summary
ConceptHistoryServer()
           
 
Method Summary
static ConceptHistoryServer createInstance(com.apelon.apelonserver.client.ServerConnection sc)
          Creates an instance of ConceptHistoryServer.
static ConceptHistoryServer createInstance(com.apelon.apelonserver.client.ServerConnection sc, boolean isValidating)
          Creates an instance of ConceptHistoryServer.
 CodeActionDate[] getAncestorCodeActionDates(int namespaceId, java.lang.String inCode, java.sql.Date iBaselineDate, java.sql.Date fBaselineDate)
          Gets the ancestor concepts' CodeActionDate of the specified concept.
 java.lang.String[] getAncestorCodes(int namespaceId, java.lang.String inCode, boolean atBaseline, java.sql.Date iBaselineDate, java.sql.Date fBaselineDate)
          Gets the ancestor concept codes of the specified concept.
 java.lang.String[] getCodeActionChildren(int namespaceId, java.lang.String inCode, java.sql.Date baselineDate)
          Gets the descendant concepts' codes of the specified concept involved in "split or merge" actions that occurred in the specified baseline date.
 java.lang.String[] getCodeActionParents(int namespaceId, java.lang.String inCode, java.sql.Date baselineDate)
          Gets the ancestor concepts' codes of the specified concept involved in "split or merge" actions that occurred in the specified baseline date.
 java.sql.Date getConceptCreationDate(int namespaceId, java.lang.String inCode)
          Gets the baseline date of creation of the specified concept.
 EditAction[] getConceptEditAction(int namespaceId, java.lang.String inCode)
          Gets all EditAction of the specified concept.
 int[] getConceptEditAction(int namespaceId, java.lang.String inCode, java.sql.Date baselineDate)
          Gets all edit actions of the specified concept registered in the specified baseline date.
 java.sql.Date[] getConceptEditActionDates(int namespaceId, java.lang.String inCode, int iAction)
          Gets all dates in which a specified action takes place on the specified concept.
 CodeActionDate[] getDescendantCodeActionDates(int namespaceId, java.lang.String inCode, java.sql.Date iBaselineDate, java.sql.Date fBaselineDate)
          Gets the descendant concepts' CodeActionDate of the specified concept.
 java.lang.String[] getDescendantCodes(int namespaceId, java.lang.String inCode, boolean atBaseline, java.sql.Date iBaselineDate, java.sql.Date fBaselineDate)
          Gets the descendant concept codes of the specified concept.
 java.sql.Date[] getHistoryDates()
          Gets all distinct dates in concept_history table.
 java.sql.Date getHistoryEnd()
          Gets the latest date in concept_history table.
 java.sql.Date getHistoryStart()
          Gets the initial date in concept_history table.
 int getNumberEditActions(int namespaceId, java.lang.String inCode, java.sql.Date baselineDate)
          Gets the number of editing actions on the specified concept registered in the specified baseline date.
 int getNumberEditActions(int namespaceId, java.lang.String inCode, java.sql.Date iBaselineDate, java.sql.Date fBaselineDate)
          Gets the number of editing actions on the specified concept registered in the specified date range.
 boolean isConceptEdited(int namespaceId, java.lang.String inCode, boolean mrg_splt, java.sql.Date iBaselineDate, java.sql.Date fBaselineDate)
          Checks if the specified concept is edited or not during a date range.
 boolean isConceptRetired(int namespaceId, java.lang.String inCode)
          Checks if the specified concept is retired or not.
 
Methods inherited from class com.apelon.apelonserver.client.BasicQuery
ping, setVersion
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConceptHistoryServer

public ConceptHistoryServer()
Method Detail

createInstance

public static ConceptHistoryServer createInstance(com.apelon.apelonserver.client.ServerConnection sc)
                                           throws com.apelon.dts.client.DTSException
Creates an instance of ConceptHistoryServer.
Depending on the type of ServerConnection object passed in the argument, the server may be local (JDBC), socket, or another implementation.

Parameters:
sc - server connectin type
Returns:
the created ConceptHistoryServer
Throws:
com.apelon.dts.client.DTSException - error
Since:
DTS 2.4
See Also:
ServerConnectionJDBC, ServerConnectionSocket

createInstance

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

Parameters:
sc - server connectin type
isValidating - a boolean value. It is true if xml needs to be validated, otherwise it is false.
Returns:
the created ConceptHistoryServer
Throws:
com.apelon.dts.client.DTSException - error
Since:
DTS 2.4
See Also:
ServerConnectionJDBC, ServerConnectionSocket

getHistoryDates

public java.sql.Date[] getHistoryDates()
                                throws com.apelon.dts.client.DTSException
Gets all distinct dates in concept_history table.

Returns:
an array of Date All distinct dates in concept_history table.
Throws:
com.apelon.dts.client.DTSException - error
Since:
DTS 2.4

getHistoryStart

public java.sql.Date getHistoryStart()
                              throws com.apelon.dts.client.DTSException
Gets the initial date in concept_history table.

Returns:
Date The initial date in the concept_history table.
Throws:
com.apelon.dts.client.DTSException - error
Since:
DTS 2.4

getHistoryEnd

public java.sql.Date getHistoryEnd()
                            throws com.apelon.dts.client.DTSException
Gets the latest date in concept_history table.

Returns:
Date The latest date in the concept_history table.
Throws:
com.apelon.dts.client.DTSException - error
Since:
DTS 2.4

getConceptCreationDate

public java.sql.Date getConceptCreationDate(int namespaceId,
                                            java.lang.String inCode)
                                     throws com.apelon.dts.client.DTSException
Gets the baseline date of creation of the specified concept.

Parameters:
namespaceId - The namespace identifier of the concept
inCode - The specified concept's code.
Returns:
Date The baseline date of creation of inCode from either "Create" or "Split" edit actions.
Throws:
com.apelon.dts.client.DTSException - error
Since:
DTS 2.4

getDescendantCodes

public java.lang.String[] getDescendantCodes(int namespaceId,
                                             java.lang.String inCode,
                                             boolean atBaseline,
                                             java.sql.Date iBaselineDate,
                                             java.sql.Date fBaselineDate)
                                      throws com.apelon.dts.client.DTSException
Gets the descendant concept codes of the specified concept. The search extends to a final baseline date starting from an initial baseline date. The search is based on a boolean value. If the value is true, the method only searches for the active concepts at the final baseline date. If the value is false, the method searches for all descendant concepts, whether active or retired. The search is only applied to "split/merge" actions and the specified concept could be the descendant concept of itself.

Parameters:
namespaceId - The namespace identifier of the concept
inCode - The specified concept's code.
atBaseline - The boolean value to specify the search type.
iBaselineDate - The initial baseline date.
fBaselineDate - The final baseline date.
Returns:
an array of String The returned concept codes which are the descendant concepts of inCode.
Throws:
com.apelon.dts.client.DTSException - error
Since:
DTS 2.4

getCodeActionChildren

public java.lang.String[] getCodeActionChildren(int namespaceId,
                                                java.lang.String inCode,
                                                java.sql.Date baselineDate)
                                         throws com.apelon.dts.client.DTSException
Gets the descendant concepts' codes of the specified concept involved in "split or merge" actions that occurred in the specified baseline date. The specified concept is included if it's not retired in the specified baseline date.

Parameters:
namespaceId - The namespace identifier of the concept
inCode - The specified concept's code.
baselineDate - The specified baseline date.
Returns:
an array of String The returned concept codes are the descendant concepts of inCode which are involved in "split or merge" actions that occurred in baselineDate.
Throws:
com.apelon.dts.client.DTSException - error
Since:
DTS 2.4

getDescendantCodeActionDates

public CodeActionDate[] getDescendantCodeActionDates(int namespaceId,
                                                     java.lang.String inCode,
                                                     java.sql.Date iBaselineDate,
                                                     java.sql.Date fBaselineDate)
                                              throws com.apelon.dts.client.DTSException
Gets the descendant concepts' CodeActionDate of the specified concept. A CodeActionDate contains a concept code and a baseline date. The method searches for all descendant concepts of the specified concept, whether active or retired. The search is only applied to the "split/merge" actions and the specified concept could be the descendant concept of itself.

Parameters:
namespaceId - The namespace identifier of the concept
inCode - The specified concept's code.
iBaselineDate - The initial baseline date.
fBaselineDate - The final baseline date.
Returns:
an array of CodeActionDate The returned CodeActionDates contain the descendant concepts of inCode and the correspond baseline dates.
Throws:
com.apelon.dts.client.DTSException - error
Since:
DTS 2.4

getAncestorCodes

public java.lang.String[] getAncestorCodes(int namespaceId,
                                           java.lang.String inCode,
                                           boolean atBaseline,
                                           java.sql.Date iBaselineDate,
                                           java.sql.Date fBaselineDate)
                                    throws com.apelon.dts.client.DTSException
Gets the ancestor concept codes of the specified concept. The search extends to a final baseline date starting from an initial baseline date. The search is based on a boolean value. If the value is true, the method only searches for the active concepts at the initial baseline date. If the value is false, the method searches for all ancestor concepts, whether active or retired. The search is only applied to "split/merge" actions and the specified concept could be the ancestor concept of itself.

Parameters:
namespaceId - The namespace identifier of the concept
inCode - The specified concept's code.
atBaseline - The boolean value to specify the search type.
iBaselineDate - The initial baseline date.
fBaselineDate - The final baseline date.
Returns:
an array of String The returned concept codes which are the ancestor concepts of inCode.
Throws:
com.apelon.dts.client.DTSException - error
Since:
DTS 2.4

getCodeActionParents

public java.lang.String[] getCodeActionParents(int namespaceId,
                                               java.lang.String inCode,
                                               java.sql.Date baselineDate)
                                        throws com.apelon.dts.client.DTSException
Gets the ancestor concepts' codes of the specified concept involved in "split or merge" actions that occurred in the specified baseline date. The specified concept is included if it's an ancestor of itself.

Parameters:
namespaceId - The namespace identifier of the concept
inCode - The specified concept's code.
baselineDate - The specified baseline date.
Returns:
an array of String The returned concept codes are the ancestor concepts of inCode which are involved in "split or merge" actions that occurred in baselineDate.
Throws:
com.apelon.dts.client.DTSException - error
Since:
DTS 2.4

getAncestorCodeActionDates

public CodeActionDate[] getAncestorCodeActionDates(int namespaceId,
                                                   java.lang.String inCode,
                                                   java.sql.Date iBaselineDate,
                                                   java.sql.Date fBaselineDate)
                                            throws com.apelon.dts.client.DTSException
Gets the ancestor concepts' CodeActionDate of the specified concept. A CodeActionDate contains a concept code and a baseline date. The method searches for all ancestor concepts of the specified concept, whether active or retired. The search is only applied to "split/merge" actions and the specified concept could be the ancestor concept of itself.

Parameters:
namespaceId - The namespace of the concept
inCode - The specified concept's code.
iBaselineDate - The initial baseline date.
fBaselineDate - The final baseline date.
Returns:
an array of CodeActionDate The returned CodeActionDates contain the ancestor concepts of inCode and the correspond baseline dates.
Throws:
com.apelon.dts.client.DTSException - error
Since:
DTS 2.4

getConceptEditActionDates

public java.sql.Date[] getConceptEditActionDates(int namespaceId,
                                                 java.lang.String inCode,
                                                 int iAction)
                                          throws com.apelon.dts.client.DTSException
Gets all dates in which a specified action takes place on the specified concept. The returned dates might not be distinct when the specified action is "split/merge".

Parameters:
namespaceId - The namespace of the concept
inCode - The specified concept's code.
iAction - The specified editing action.
Returns:
an array of Date All dates in which iAction takes place on inCode.
Throws:
com.apelon.dts.client.DTSException - error
Since:
DTS 2.4

getConceptEditAction

public EditAction[] getConceptEditAction(int namespaceId,
                                         java.lang.String inCode)
                                  throws com.apelon.dts.client.DTSException
Gets all EditAction of the specified concept. A EditAction contains a edit date and an editing action. The method searches for all editing actions and the corresponding editing dates on the specified concept.

Parameters:
namespaceId - The namespace of the concept
inCode - The specified concept's code.
Returns:
an array of EditAction The returned EditActions contain all editing actions and the corresponding editing dates on inCode.
Throws:
com.apelon.dts.client.DTSException - error
Since:
DTS 2.4

isConceptRetired

public boolean isConceptRetired(int namespaceId,
                                java.lang.String inCode)
                         throws com.apelon.dts.client.DTSException
Checks if the specified concept is retired or not.

Parameters:
namespaceId - The namespace of the concept
inCode - The specified concept's code.
Returns:
a boolean True - inCode is retired. False - inCode is active.
Throws:
com.apelon.dts.client.DTSException - error
Since:
DTS 2.4

isConceptEdited

public boolean isConceptEdited(int namespaceId,
                               java.lang.String inCode,
                               boolean mrg_splt,
                               java.sql.Date iBaselineDate,
                               java.sql.Date fBaselineDate)
                        throws com.apelon.dts.client.DTSException
Checks if the specified concept is edited or not during a date range. The check is depended on a boolean value. If the boolean value is true, the method only checks if the specified concept was merged or split in the date range. If the boolean value is false, the method checks if the specified concept was edited in any way in the date range.

Parameters:
namespaceId - The namespace of the concept
inCode - The specified concept's code.
mrg_splt - True - only check for "merge or split" editing action. False - check for any editing action.
iBaselineDate - The initial baseline date.
fBaselineDate - The final baseline date.
Returns:
a boolean True - inCode is edited. False - inCode isn't edited.
Throws:
com.apelon.dts.client.DTSException - error
Since:
DTS 2.4

getNumberEditActions

public int getNumberEditActions(int namespaceId,
                                java.lang.String inCode,
                                java.sql.Date baselineDate)
                         throws com.apelon.dts.client.DTSException
Gets the number of editing actions on the specified concept registered in the specified baseline date.

Parameters:
namespaceId - The namespace of the concept
inCode - The specified concept's code.
baselineDate - The specified baseline date.
Returns:
an int The number of editing actions on inCode registered in baselineDate.
Throws:
com.apelon.dts.client.DTSException - error
Since:
DTS 2.4

getNumberEditActions

public int getNumberEditActions(int namespaceId,
                                java.lang.String inCode,
                                java.sql.Date iBaselineDate,
                                java.sql.Date fBaselineDate)
                         throws com.apelon.dts.client.DTSException
Gets the number of editing actions on the specified concept registered in the specified date range.

Parameters:
namespaceId - The namespace identifier of the concept
inCode - The specified concept's code.
iBaselineDate - The initial baseline date.
fBaselineDate - The final baseline date.
Returns:
an int The number of editing actions on inCode registered from iBaselineDate to fBaseline.
Throws:
com.apelon.dts.client.DTSException - error
Since:
DTS 2.4

getConceptEditAction

public int[] getConceptEditAction(int namespaceId,
                                  java.lang.String inCode,
                                  java.sql.Date baselineDate)
                           throws com.apelon.dts.client.DTSException
Gets all edit actions of the specified concept registered in the specified baseline date. The result is an array of Integer which is corresponding to the editing action constants defined in EditActionConstants class.

Parameters:
namespaceId - The namespace identifier of the concept
inCode - The specified concept's code.
baselineDate - The specified baseline date.
Returns:
an array of int All edit action constants of inCode registered in baselineDate.
Throws:
com.apelon.dts.client.DTSException - error
Since:
DTS 2.4