org.lexgrid.valuesets.impl
Class LexEVSPickListDefinitionServicesImpl

java.lang.Object
  extended by org.lexgrid.valuesets.impl.LexEVSPickListDefinitionServicesImpl
All Implemented Interfaces:
java.io.Serializable, LexEVSPickListDefinitionServices

public class LexEVSPickListDefinitionServicesImpl
extends java.lang.Object
implements LexEVSPickListDefinitionServices

Implements LexEVSPickListSerives.

Author:
Sridhar Dwarkanath
See Also:
Serialized Form

Field Summary
protected  MessageDirector md_
           
protected  LoadStatus status_
           
 
Constructor Summary
LexEVSPickListDefinitionServicesImpl()
           
 
Method Summary
static LexEVSPickListDefinitionServices defaultInstance()
          Returns a default singleton instance of the service.
 void exportPickListDefinition(java.lang.String pickListId, java.lang.String xmlFolderLocation, boolean overwrite, boolean failOnAllErrors)
          Exports the pick list definition in LexGrid XML format.
 java.lang.String getDescription()
           
 LexBIGService getLexBIGService()
          Return the associated LexBIGService instance; lazy initialized as required.
 LogEntry[] getLogEntries()
           
 java.lang.String getName()
           
 PickListDefinition getPickListDefinitionById(java.lang.String pickListId)
          Returns pickList definition for supplied pickListId.
 java.util.List<java.lang.String> getPickListDefinitionIdForValueSetDefinitionUri(java.net.URI valueSetDefURI)
          Returns all the pickList definition id's that represents supplied value set definition URI.
 java.util.List<java.lang.String> getPickListIdsForSupportedTagAndValue(java.lang.String supportedTag, java.lang.String value)
          Returns all the pickListIds that contain supplied supported tag and value.
 java.net.URI getPickListValueSetDefinition(java.lang.String pickListId)
          Returns an URI of the represented value set definition of the pickList.
 java.lang.String getProvider()
           
 java.util.Map<java.lang.String,java.lang.String> getReferencedPLDefinitions(java.lang.String valueSet, java.lang.Boolean extractPickListName)
          Return the map set of pick list id and pick list name that references value set definition URI
 java.util.Map<java.lang.String,java.lang.String> getReferencedPLDefinitions(java.lang.String entityCode, java.lang.String entityCodeNameSpace, java.lang.String propertyId, java.lang.Boolean extractPickListName)
          Return the map set of pick list id and pick list name that references given entityCode, namespace and optionally propertyId
 java.lang.String getVersion()
           
 java.util.List<java.lang.String> listPickListIds()
          Returns list of pickListIds that are available in the system.
 void loadPickList(PickListDefinition pldef, java.lang.String systemReleaseURI, Mappings mappings)
          Loads supplied PickListDefinition object
 void loadPickList(java.lang.String xmlFileLocation, boolean failOnAllErrors)
          Loads pick list by reading XML file location supplied
 void removePickList(java.lang.String pickListId)
          Removes pick list definition from the system that matches supplied pickListId.
 ResolvedPickListEntryList resolvePickList(PickListDefinition pickList, boolean sortByText, AbsoluteCodingSchemeVersionReferenceList csVersionList, java.lang.String versionTag)
          Resolves pick list definition object supplied against supplied coding scheme version list.
 ResolvedPickListEntryList resolvePickList(java.lang.String pickListId, boolean sortByText, AbsoluteCodingSchemeVersionReferenceList csVersionList, java.lang.String versionTag)
          Resolves pickList definition for supplied pickListId.
 ResolvedPickListEntryList resolvePickList(java.lang.String pickListId, java.lang.Integer sortType, AbsoluteCodingSchemeVersionReferenceList csVersionList, java.lang.String versionTag)
          Resolves pickList definition for supplied pickListId.
 PickListDefinition resolvePickListByRevision(java.lang.String pickListId, java.lang.String revisionId, java.lang.Integer sortOrder)
           
 ResolvedPickListEntryList resolvePickListForTerm(java.lang.String pickListId, java.lang.String term, java.lang.String matchAlgorithm, java.lang.String language, java.lang.String[] context, boolean sortByText, AbsoluteCodingSchemeVersionReferenceList csVersionList, java.lang.String versionTag)
          Resolves pickList definition for supplied arguments.
static void setDefaultInstance(LexEVSPickListDefinitionServicesImpl defaultInstance)
          Assigns the default singleton instance of the service.
 void setLexBIGService(LexBIGService lbs)
          Assign the associated LexBIGService instance.
 void validate(java.net.URI uri, int v1)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

md_

protected MessageDirector md_

status_

protected LoadStatus status_
Constructor Detail

LexEVSPickListDefinitionServicesImpl

public LexEVSPickListDefinitionServicesImpl()
Method Detail

defaultInstance

public static LexEVSPickListDefinitionServices defaultInstance()
Returns a default singleton instance of the service.

Note: This is the recommended method of acquiring the service, since it will allow the application to run without change in distributed LexBIG environments (in which case the default instance is actually a distributed service). However, use of the public constructor is supported to preserve backward compatibility.

Returns:
LexEVSPickListDefinitionServices

setDefaultInstance

public static void setDefaultInstance(LexEVSPickListDefinitionServicesImpl defaultInstance)
Assigns the default singleton instance of the service.

Note: While this method is public, it is generally not intended to be part of the externalized API. It is made public so that the runtime system has the ability to assign the default instance when running in distributed LexBIG environments, etc.

Parameters:
LexEVSPickListDefinitionServicesImpl - the default instance.

loadPickList

public void loadPickList(PickListDefinition pldef,
                         java.lang.String systemReleaseURI,
                         Mappings mappings)
                  throws LBException
Description copied from interface: LexEVSPickListDefinitionServices
Loads supplied PickListDefinition object

Specified by:
loadPickList in interface LexEVSPickListDefinitionServices
Parameters:
pldef - pick list to load
Throws:
LBException

loadPickList

public void loadPickList(java.lang.String xmlFileLocation,
                         boolean failOnAllErrors)
                  throws LBException
Description copied from interface: LexEVSPickListDefinitionServices
Loads pick list by reading XML file location supplied

Specified by:
loadPickList in interface LexEVSPickListDefinitionServices
Parameters:
xmlFileLocation - XML file containing pick list definitions
Throws:
LBException

validate

public void validate(java.net.URI uri,
                     int v1)
              throws LBException
Specified by:
validate in interface LexEVSPickListDefinitionServices
Parameters:
uri - XML file containing pickList definitions
v1 - validate <int> Perform validation of the candidate resource without loading data. Supported levels of validation include: 0 = Verify document is well-formed 1 = Verify document is valid
Throws:
LBException

getPickListDefinitionById

public PickListDefinition getPickListDefinitionById(java.lang.String pickListId)
                                             throws LBException
Description copied from interface: LexEVSPickListDefinitionServices
Returns pickList definition for supplied pickListId.

Specified by:
getPickListDefinitionById in interface LexEVSPickListDefinitionServices
Parameters:
pickListId - pickListId of a pickListDefinition
Returns:
PickListDefinition object.
Throws:
LBException

listPickListIds

public java.util.List<java.lang.String> listPickListIds()
                                                 throws LBException
Description copied from interface: LexEVSPickListDefinitionServices
Returns list of pickListIds that are available in the system.

Specified by:
listPickListIds in interface LexEVSPickListDefinitionServices
Returns:
list of available pickListIds
Throws:
LBException

getPickListValueSetDefinition

public java.net.URI getPickListValueSetDefinition(java.lang.String pickListId)
                                           throws LBException
Description copied from interface: LexEVSPickListDefinitionServices
Returns an URI of the represented value set definition of the pickList.

Specified by:
getPickListValueSetDefinition in interface LexEVSPickListDefinitionServices
Returns:
valueSetDefURI
Throws:
LBException

getPickListDefinitionIdForValueSetDefinitionUri

public java.util.List<java.lang.String> getPickListDefinitionIdForValueSetDefinitionUri(java.net.URI valueSetDefURI)
                                                                                 throws LBException
Description copied from interface: LexEVSPickListDefinitionServices
Returns all the pickList definition id's that represents supplied value set definition URI.

Specified by:
getPickListDefinitionIdForValueSetDefinitionUri in interface LexEVSPickListDefinitionServices
Parameters:
valueSetDefURI - URI of an value set definition
Returns:
List of Pick List Definition Id's that represents supplied valueSetDefURI.
Throws:
LBException

resolvePickListForTerm

public ResolvedPickListEntryList resolvePickListForTerm(java.lang.String pickListId,
                                                        java.lang.String term,
                                                        java.lang.String matchAlgorithm,
                                                        java.lang.String language,
                                                        java.lang.String[] context,
                                                        boolean sortByText,
                                                        AbsoluteCodingSchemeVersionReferenceList csVersionList,
                                                        java.lang.String versionTag)
                                                 throws LBException
Description copied from interface: LexEVSPickListDefinitionServices
Resolves pickList definition for supplied arguments.

Specified by:
resolvePickListForTerm in interface LexEVSPickListDefinitionServices
Parameters:
pickListId - pickListId of a pickListDefinition. This is required argument.
term - Term to restrict. This is required argument.
matchAlgorithm - Optional, match algorithm to use.
language - Optional, language to restrict.
context - Optional, list of context to restrict.
sortByText - If True; the resolved pickListEntries will be sorted by text in ascending order.
csVersionList - - a list of coding scheme URI's and versions to be used. These will be used only if they are present in the service. If absent, the most recent version will be used instead.
versionTag - - the tag (e.g "devel", "production", ...) to be used to reconcile coding schemes when more than one is present. Note that non-tagged versions will be used if the tagged version is missing.
Returns:
Resolved PickListEntries.
Throws:
LBException

resolvePickList

public ResolvedPickListEntryList resolvePickList(java.lang.String pickListId,
                                                 boolean sortByText,
                                                 AbsoluteCodingSchemeVersionReferenceList csVersionList,
                                                 java.lang.String versionTag)
                                          throws LBException
Description copied from interface: LexEVSPickListDefinitionServices
Resolves pickList definition for supplied pickListId.

Specified by:
resolvePickList in interface LexEVSPickListDefinitionServices
Parameters:
pickListId - pickListId of a pickListDefinition.
sortByText - If True; the resolved pickListEntries will be sorted by text in ascending order.
csVersionList - - a list of coding scheme URI's and versions to be used. These will be used only if they are present in the service. If absent, the most recent version will be used instead.
versionTag - - the tag (e.g "devel", "production", ...) to be used to reconcile coding schemes when more than one is present. Note that non-tagged versions will be used if the tagged version is missing.
Returns:
Resolved PickListEntries.
Throws:
LBException

resolvePickList

public ResolvedPickListEntryList resolvePickList(java.lang.String pickListId,
                                                 java.lang.Integer sortType,
                                                 AbsoluteCodingSchemeVersionReferenceList csVersionList,
                                                 java.lang.String versionTag)
                                          throws LBException
Description copied from interface: LexEVSPickListDefinitionServices
Resolves pickList definition for supplied pickListId.

Specified by:
resolvePickList in interface LexEVSPickListDefinitionServices
Parameters:
pickListId - pickListId of a pickListDefinition.
csVersionList - - a list of coding scheme URI's and versions to be used. These will be used only if they are present in the service. If absent, the most recent version will be used instead.
versionTag - - the tag (e.g "devel", "production", ...) to be used to reconcile coding schemes when more than one is present. Note that non-tagged versions will be used if the tagged version is missing.
Returns:
Resolved PickListEntries.
Throws:
LBException

resolvePickList

public ResolvedPickListEntryList resolvePickList(PickListDefinition pickList,
                                                 boolean sortByText,
                                                 AbsoluteCodingSchemeVersionReferenceList csVersionList,
                                                 java.lang.String versionTag)
                                          throws LBException
Description copied from interface: LexEVSPickListDefinitionServices
Resolves pick list definition object supplied against supplied coding scheme version list.

Specified by:
resolvePickList in interface LexEVSPickListDefinitionServices
Parameters:
pickList - pickListDefinition object.
sortByText - If True; the resolved pickListEntries will be sorted by text in ascending order.
csVersionList - - a list of coding scheme URI's and versions to be used. These will be used only if they are present in the service. If absent, the most recent version will be used instead.
versionTag - - the tag (e.g "devel", "production", ...) to be used to reconcile coding schemes when more than one is present. Note that non-tagged versions will be used if the tagged version is missing.
Returns:
Resolved PickListEntries.
Throws:
LBException

removePickList

public void removePickList(java.lang.String pickListId)
                    throws LBException
Description copied from interface: LexEVSPickListDefinitionServices
Removes pick list definition from the system that matches supplied pickListId.

Specified by:
removePickList in interface LexEVSPickListDefinitionServices
Parameters:
pickListId - id of pickList to remove
Throws:
LBException

getReferencedPLDefinitions

public java.util.Map<java.lang.String,java.lang.String> getReferencedPLDefinitions(java.lang.String entityCode,
                                                                                   java.lang.String entityCodeNameSpace,
                                                                                   java.lang.String propertyId,
                                                                                   java.lang.Boolean extractPickListName)
                                                                            throws LBException
Description copied from interface: LexEVSPickListDefinitionServices
Return the map set of pick list id and pick list name that references given entityCode, namespace and optionally propertyId

Specified by:
getReferencedPLDefinitions in interface LexEVSPickListDefinitionServices
Parameters:
entityCode - referenced entityCode
entityCodeNameSpace - referenced entityCodeNamespace
propertyId - Optional propertyId
extractPickListName - true means pick list name will be extracted in the map set.
Returns:
Mapset of pick list id and pick list name
Throws:
LBException

getReferencedPLDefinitions

public java.util.Map<java.lang.String,java.lang.String> getReferencedPLDefinitions(java.lang.String valueSet,
                                                                                   java.lang.Boolean extractPickListName)
                                                                            throws LBException
Description copied from interface: LexEVSPickListDefinitionServices
Return the map set of pick list id and pick list name that references value set definition URI

Specified by:
getReferencedPLDefinitions in interface LexEVSPickListDefinitionServices
Parameters:
valueSet - URI of value set definition
extractPickListName - true means pick list name will be extracted in the map set
Returns:
Mapset of pick list id and pick list name
Throws:
LBException

getDescription

public java.lang.String getDescription()

getName

public java.lang.String getName()

getProvider

public java.lang.String getProvider()

getVersion

public java.lang.String getVersion()

getLogEntries

public LogEntry[] getLogEntries()
Specified by:
getLogEntries in interface LexEVSPickListDefinitionServices

setLexBIGService

public void setLexBIGService(LexBIGService lbs)
Assign the associated LexBIGService instance.

Note: This method must be invoked by users of the distributed LexBIG API to set the service to an EVSApplicationService object, allowing client side implementations to use these convenience methods.


getLexBIGService

public LexBIGService getLexBIGService()
Return the associated LexBIGService instance; lazy initialized as required.


getPickListIdsForSupportedTagAndValue

public java.util.List<java.lang.String> getPickListIdsForSupportedTagAndValue(java.lang.String supportedTag,
                                                                              java.lang.String value)
Description copied from interface: LexEVSPickListDefinitionServices
Returns all the pickListIds that contain supplied supported tag and value.

Specified by:
getPickListIdsForSupportedTagAndValue in interface LexEVSPickListDefinitionServices
Parameters:
supportedTag - like SupportedCodingScheme, SupportedAssociation etc.
value - value to look for
Returns:
list of pickListIds that contains supportedTag with value.

exportPickListDefinition

public void exportPickListDefinition(java.lang.String pickListId,
                                     java.lang.String xmlFolderLocation,
                                     boolean overwrite,
                                     boolean failOnAllErrors)
                              throws LBException
Description copied from interface: LexEVSPickListDefinitionServices
Exports the pick list definition in LexGrid XML format.

Specified by:
exportPickListDefinition in interface LexEVSPickListDefinitionServices
Parameters:
pickListId - id of pick list definition to export
xmlFolderLocation - destination location
Throws:
LBException

resolvePickListByRevision

public PickListDefinition resolvePickListByRevision(java.lang.String pickListId,
                                                    java.lang.String revisionId,
                                                    java.lang.Integer sortOrder)
                                             throws LBRevisionException
Specified by:
resolvePickListByRevision in interface LexEVSPickListDefinitionServices
Throws:
LBRevisionException

Copyright: (c) 2004-2006 Mayo Foundation for Medical Education and Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the triple-shield Mayo logo are trademarks and service marks of MFMER.