public class ServiceUtility
extends java.lang.Object
Constructor and Description |
---|
ServiceUtility() |
Modifier and Type | Method and Description |
---|---|
static AbsoluteCodingSchemeVersionReference |
getAbsoluteCodingSchemeVersionReference(java.lang.String codingScheme,
CodingSchemeVersionOrTag tagOrVersion,
boolean strict)
Gets the absolute coding scheme version reference.
|
static AssociationEntity |
getAssociationEntity(java.lang.String codingScheme,
CodingSchemeVersionOrTag tagOrVersion,
java.lang.String associationLocalName) |
static java.lang.String |
getCodingSchemeName(java.lang.String codingScheme,
java.lang.String version)
Gets the coding scheme name.
|
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 Relations |
getRelationsForMappingScheme(java.lang.String schemeUri,
java.lang.String schemeVersion,
java.lang.String relationsContainerName) |
static ResolvedConceptReference |
getResolvedConceptReference(java.lang.String codingSchemeUri,
java.lang.String codingSchemeVersion,
java.lang.String entityCode,
java.lang.String entityCodeNamespace)
Gets the entity.
|
static java.lang.String |
getSchemaVersionForCodingScheme(java.lang.String codingSchemeName,
CodingSchemeVersionOrTag versionOrTag)
Gets the schema version for coding scheme.
|
static <T extends URIMap> |
getSupportedAttribute(java.lang.String uri,
java.lang.String version,
java.lang.String localName,
java.lang.Class<T> uriMap) |
static java.lang.String |
getSupportedAttributeLocalNameForUri(java.lang.String codingScheme,
CodingSchemeVersionOrTag tagOrVersion,
java.lang.String uri) |
static java.lang.String |
getUriForCodingSchemeName(java.lang.String codingSchemeName) |
static java.util.List<java.lang.String> |
getValidAssociationsForTargetOrSource(AbsoluteCodingSchemeVersionReference ref,
java.lang.String entityCode) |
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 |
isValidNodeForAssociation(AbsoluteCodingSchemeVersionReference ref,
java.lang.String entityCode,
java.lang.String associationName) |
static boolean |
IsValidParameter(java.lang.String codingSchemeNameOrUri,
java.lang.String codingSchemeVersion,
java.lang.String localId,
java.lang.Class<? extends URIMap> supportedAttributeClass) |
static java.lang.String |
normalizeGraphandGraphDatabaseName(AbsoluteCodingSchemeVersionReference ref) |
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 <T extends ResolvedConceptReference> |
resolveResolvedConceptReference(java.lang.String uri,
java.lang.String version,
LocalNameList propertyNames,
CodedNodeSet.PropertyType[] propertyTypes,
NamespaceHandler namespaceHandler,
T resolvedConceptReference)
Resolve resolved concept reference.
|
static <T extends ResolvedConceptReference> |
resolveResolvedConceptReference(java.lang.String uri,
java.lang.String version,
LocalNameList propertyNames,
CodedNodeSet.PropertyType[] propertyTypes,
T resolvedConceptReference)
Resolve resolved concept reference.
|
static <T extends java.lang.Throwable,O> |
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.
|
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 versionLBParameterException
- the LB parameter exceptionpublic static Entity resolveConceptReference(ResolvedConceptReference conceptReference) throws LBParameterException
conceptReference
- the concept referenceLBParameterException
- 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 strictLBParameterException
- the LB parameter exceptionpublic static java.lang.String getVersion(java.lang.String codingScheme, CodingSchemeVersionOrTag tagOrVersion) throws LBParameterException
codingScheme
- the coding schemetagOrVersion
- the tag or versionLBParameterException
- the LB parameter exceptionpublic static java.lang.String getUriForCodingSchemeName(java.lang.String codingSchemeName) throws LBParameterException
codingSchemeName
- name or uri gets URILBParameterException
public static java.lang.String getCodingSchemeName(java.lang.String codingScheme, java.lang.String version) throws LBParameterException
codingScheme
- the coding schemeversion
- the versionLBParameterException
- 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 classLBParameterException
- 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 strictT
- the TT 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 classLBParameterException
- the LB parameter exceptionpublic static boolean IsValidParameter(java.lang.String codingSchemeNameOrUri, java.lang.String codingSchemeVersion, java.lang.String localId, java.lang.Class<? extends URIMap> supportedAttributeClass) throws LBParameterException
LBParameterException
public static Filter[] validateFilters(LocalNameList filterOptions) throws LBParameterException
filterOptions
- the filter optionsLBParameterException
- the LB parameter exceptionpublic static boolean isSortAlgorithmValid(java.lang.String algorithm, SortContext context)
algorithm
- the algorithmcontext
- the contextpublic static boolean passFilters(ResolvedConceptReference candidate, Filter[] filterOptions)
candidate
- the candidatefilterOptions
- the filter optionspublic 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 referenceLBParameterException
- 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 referencepublic static java.lang.String getSchemaVersionForCodingScheme(java.lang.String codingSchemeName, CodingSchemeVersionOrTag versionOrTag) throws LBParameterException
codingSchemeName
- the coding scheme nameversionOrTag
- the version or tagLBParameterException
- the LB parameter exceptionpublic static ResolvedConceptReference getResolvedConceptReference(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 namespaceLBException
- the LB exceptionpublic static void validateSortOptions(SortOptionList sortOptions) throws LBParameterException
sortOptions
- the sort optionsLBParameterException
- the LB parameter exceptionpublic static boolean isSupplement(java.lang.String codingScheme, CodingSchemeVersionOrTag tagOrVersion) throws LBParameterException
codingScheme
- the coding schemetagOrVersion
- the tag or versionLBParameterException
- the LB parameter exceptionpublic static boolean isSupplement(java.lang.String uri, java.lang.String version) throws LBParameterException
uri
- the uriversion
- the versionLBParameterException
- the LB parameter exceptionpublic static AbsoluteCodingSchemeVersionReference getParentOfSupplement(java.lang.String codingScheme, CodingSchemeVersionOrTag tagOrVersion) throws LBParameterException
uri
- the uriversion
- the versionLBParameterException
- the LB parameter exceptionpublic static AbsoluteCodingSchemeVersionReference getParentOfSupplement(java.lang.String uri, java.lang.String version) throws LBParameterException
uri
- the uriversion
- the versionLBParameterException
- the LB parameter exceptionpublic static AssociationEntity getAssociationEntity(java.lang.String codingScheme, CodingSchemeVersionOrTag tagOrVersion, java.lang.String associationLocalName) throws LBParameterException
LBParameterException
public static <T extends URIMap> T getSupportedAttribute(java.lang.String uri, java.lang.String version, java.lang.String localName, java.lang.Class<T> uriMap) throws LBParameterException
LBParameterException
public static java.lang.String getSupportedAttributeLocalNameForUri(java.lang.String codingScheme, CodingSchemeVersionOrTag tagOrVersion, java.lang.String uri) throws LBException
LBException
public static Relations getRelationsForMappingScheme(java.lang.String schemeUri, java.lang.String schemeVersion, java.lang.String relationsContainerName)
public static boolean isValidNodeForAssociation(AbsoluteCodingSchemeVersionReference ref, java.lang.String entityCode, java.lang.String associationName)
public static java.util.List<java.lang.String> getValidAssociationsForTargetOrSource(AbsoluteCodingSchemeVersionReference ref, java.lang.String entityCode)
public static java.lang.String normalizeGraphandGraphDatabaseName(AbsoluteCodingSchemeVersionReference ref) throws LBParameterException
LBParameterException