|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.LexGrid.LexBIG.Utility.ServiceUtility
public class ServiceUtility
Utility ServiceUtility Class with various helper methods.
Constructor Summary | |
---|---|
ServiceUtility()
|
Method Summary | ||
---|---|---|
static AbsoluteCodingSchemeVersionReference |
getAbsoluteCodingSchemeVersionReference(java.lang.String codingScheme,
CodingSchemeVersionOrTag tagOrVersion,
boolean strict)
Gets the absolute coding scheme version reference. |
|
static java.lang.String |
getCodingSchemeName(java.lang.String codingScheme,
java.lang.String version)
Gets the coding scheme name. |
|
static Entity |
getEntity(java.lang.String codingSchemeUri,
java.lang.String codingSchemeVersion,
java.lang.String entityCode,
java.lang.String entityCodeNamespace)
Gets the entity. |
|
static AbsoluteCodingSchemeVersionReference |
getParentOfSupplement(java.lang.String codingScheme,
CodingSchemeVersionOrTag tagOrVersion)
Gets the parent of a supplement. |
|
static AbsoluteCodingSchemeVersionReference |
getParentOfSupplement(java.lang.String uri,
java.lang.String version)
Gets the parent of a supplement. |
|
static java.lang.String |
getSchemaVersionForCodingScheme(java.lang.String codingSchemeName,
CodingSchemeVersionOrTag versionOrTag)
Gets the schema version for coding scheme. |
|
static java.lang.String |
getVersion(java.lang.String codingScheme,
CodingSchemeVersionOrTag tagOrVersion)
Gets the version. |
|
static boolean |
isSortAlgorithmValid(java.lang.String algorithm,
SortContext context)
Checks if is sort algorithm valid. |
|
static boolean |
isSupplement(java.lang.String codingScheme,
CodingSchemeVersionOrTag tagOrVersion)
Checks if a given coding scheme is a supplement. |
|
static boolean |
isSupplement(java.lang.String uri,
java.lang.String version)
Checks if a given coding scheme is a supplement. |
|
static boolean |
passFilters(ResolvedConceptReference candidate,
Filter[] filterOptions)
Pass filters. |
|
static AbsoluteCodingSchemeVersionReference |
resolveCodingSchemeFromLocalName(java.lang.String uri,
java.lang.String version,
java.lang.String codingSchemeLocalName,
java.lang.String localCodingSchemeVersion)
Resolve coding scheme from local name. |
|
static Entity |
resolveConceptReference(ResolvedConceptReference conceptReference)
Resolve concept reference. |
|
static
|
resolveResolvedConceptReference(java.lang.String uri,
java.lang.String version,
LocalNameList propertyNames,
CodedNodeSet.PropertyType[] propertyTypes,
NamespaceHandler namespaceHandler,
T resolvedConceptReference)
Resolve resolved concept reference. |
|
static
|
resolveResolvedConceptReference(java.lang.String uri,
java.lang.String version,
LocalNameList propertyNames,
CodedNodeSet.PropertyType[] propertyTypes,
T resolvedConceptReference)
Resolve resolved concept reference. |
|
static
|
throwExceptionOrReturnDefault(T exception,
O defaultReturnValue,
boolean strict)
Throw exception or return default. |
|
static Filter[] |
validateFilters(LocalNameList filterOptions)
Validate filters. |
|
static void |
validateParameter(java.lang.String codingSchemeNameOrUri,
java.lang.String codingSchemeVersion,
LocalNameList list,
java.lang.Class<? extends URIMap> supportedAttributeClass)
Validate parameter. |
|
static void |
validateParameter(java.lang.String codingSchemeNameOrUri,
java.lang.String codingSchemeVersion,
java.lang.String localId,
java.lang.Class<? extends URIMap> supportedAttributeClass)
Validate parameter. |
|
static void |
validateSortOptions(SortOptionList sortOptions)
Validate sort options. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServiceUtility()
Method Detail |
---|
public static AbsoluteCodingSchemeVersionReference resolveCodingSchemeFromLocalName(java.lang.String uri, java.lang.String version, java.lang.String codingSchemeLocalName, java.lang.String localCodingSchemeVersion) throws LBParameterException
uri
- the uriversion
- the versionrelationsCodingSchemeLocalName
- the relations coding scheme local namerelationsCodingSchemeVersion
- the relations coding scheme version
LBParameterException
- the LB parameter exceptionpublic static Entity resolveConceptReference(ResolvedConceptReference conceptReference) throws LBParameterException
conceptReference
- the concept reference
LBParameterException
- the LB parameter exceptionpublic static AbsoluteCodingSchemeVersionReference getAbsoluteCodingSchemeVersionReference(java.lang.String codingScheme, CodingSchemeVersionOrTag tagOrVersion, boolean strict) throws LBParameterException
codingScheme
- the coding schemetagOrVersion
- the tag or versionstrict
- the strict
LBParameterException
- the LB parameter exceptionpublic static java.lang.String getVersion(java.lang.String codingScheme, CodingSchemeVersionOrTag tagOrVersion) throws LBParameterException
codingScheme
- the coding schemetagOrVersion
- the tag or version
LBParameterException
- the LB parameter exceptionpublic static java.lang.String getCodingSchemeName(java.lang.String codingScheme, java.lang.String version) throws LBParameterException
codingScheme
- the coding schemeversion
- the version
LBParameterException
- the LB parameter exceptionpublic static void validateParameter(java.lang.String codingSchemeNameOrUri, java.lang.String codingSchemeVersion, LocalNameList list, java.lang.Class<? extends URIMap> supportedAttributeClass) throws LBParameterException
codingSchemeNameOrUri
- the coding scheme name or uricodingSchemeVersion
- the coding scheme versionlist
- the listsupportedAttributeClass
- the supported attribute class
LBParameterException
- the LB parameter exceptionpublic static <T extends java.lang.Throwable,O> O throwExceptionOrReturnDefault(T exception, O defaultReturnValue, boolean strict) throws T extends java.lang.Throwable
exception
- the exceptiondefaultReturnValue
- the default return valuestrict
- the strict
T
- the T
T extends java.lang.Throwable
public static void validateParameter(java.lang.String codingSchemeNameOrUri, java.lang.String codingSchemeVersion, java.lang.String localId, java.lang.Class<? extends URIMap> supportedAttributeClass) throws LBParameterException
codingSchemeNameOrUri
- the coding scheme name or uricodingSchemeVersion
- the coding scheme versionlocalId
- the local idsupportedAttributeClass
- the supported attribute class
LBParameterException
- the LB parameter exceptionpublic static Filter[] validateFilters(LocalNameList filterOptions) throws LBParameterException
filterOptions
- the filter options
LBParameterException
- the LB parameter exceptionpublic static boolean isSortAlgorithmValid(java.lang.String algorithm, SortContext context)
algorithm
- the algorithmcontext
- the context
public static boolean passFilters(ResolvedConceptReference candidate, Filter[] filterOptions)
candidate
- the candidatefilterOptions
- the filter options
public static <T extends ResolvedConceptReference> T resolveResolvedConceptReference(java.lang.String uri, java.lang.String version, LocalNameList propertyNames, CodedNodeSet.PropertyType[] propertyTypes, NamespaceHandler namespaceHandler, T resolvedConceptReference) throws LBParameterException
uri
- the uriversion
- the versionpropertyNames
- the property namespropertyTypes
- the property typesnamespaceHandler
- the namespace handlerresolvedConceptReference
- the resolved concept reference
LBParameterException
- the LB parameter exceptionpublic static <T extends ResolvedConceptReference> T resolveResolvedConceptReference(java.lang.String uri, java.lang.String version, LocalNameList propertyNames, CodedNodeSet.PropertyType[] propertyTypes, T resolvedConceptReference)
uri
- the uriversion
- the versionpropertyNames
- the property namespropertyTypes
- the property typesresolvedConceptReference
- the resolved concept reference
public static java.lang.String getSchemaVersionForCodingScheme(java.lang.String codingSchemeName, CodingSchemeVersionOrTag versionOrTag) throws LBParameterException
codingSchemeName
- the coding scheme nameversionOrTag
- the version or tag
LBParameterException
- the LB parameter exceptionpublic static Entity getEntity(java.lang.String codingSchemeUri, java.lang.String codingSchemeVersion, java.lang.String entityCode, java.lang.String entityCodeNamespace) throws LBException
codingSchemeUri
- the coding scheme uricodingSchemeVersion
- the coding scheme versionentityCode
- the entity codeentityCodeNamespace
- the entity code namespace
LBException
- the LB exceptionpublic static void validateSortOptions(SortOptionList sortOptions) throws LBParameterException
sortOptions
- the sort options
LBParameterException
- the LB parameter exceptionpublic static boolean isSupplement(java.lang.String codingScheme, CodingSchemeVersionOrTag tagOrVersion) throws LBParameterException
codingScheme
- the coding schemetagOrVersion
- the tag or version
LBParameterException
- the LB parameter exceptionpublic static boolean isSupplement(java.lang.String uri, java.lang.String version) throws LBParameterException
uri
- the uriversion
- the version
LBParameterException
- the LB parameter exceptionpublic static AbsoluteCodingSchemeVersionReference getParentOfSupplement(java.lang.String codingScheme, CodingSchemeVersionOrTag tagOrVersion) throws LBParameterException
uri
- the uriversion
- the version
LBParameterException
- the LB parameter exceptionpublic static AbsoluteCodingSchemeVersionReference getParentOfSupplement(java.lang.String uri, java.lang.String version) throws LBParameterException
uri
- the uriversion
- the version
LBParameterException
- the LB parameter exception
|
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. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |