se.cambio.cds.ts
Class TerminologyServiceImpl

Package class diagram package TerminologyServiceImpl
java.lang.Object
  extended by se.cambio.cds.ts.TerminologyServiceImpl
All Implemented Interfaces:
TerminologyService

public class TerminologyServiceImpl
extends Object
implements TerminologyService


Method Summary
static TerminologyService getInstance(InputStream configuration)
           
 Collection<String> getSupportedTerminologies()
           
 boolean hasAttributeOfValue(org.openehr.rm.datatypes.text.CodePhrase concept, org.openehr.rm.datatypes.text.CodePhrase attribute, org.openehr.rm.datatypes.text.CodePhrase value)
           
 boolean hasPropertyOfValue(org.openehr.rm.datatypes.text.CodePhrase concept, org.openehr.rm.datatypes.text.CodePhrase property, org.openehr.rm.datatypes.text.CodePhrase value)
          Checks if given concept has a named attribute of given value
 void init(InputStream configuration)
           
 boolean isSubclassOf(org.openehr.rm.datatypes.text.CodePhrase a, org.openehr.rm.datatypes.text.CodePhrase b)
          Checks if codePhrase a is subclass of b with regards to subsumption relationship
 boolean isSubclassOf(org.openehr.rm.datatypes.text.CodePhrase code, Set<org.openehr.rm.datatypes.text.CodePhrase> codes)
          Checks if the given code is subclass of any member of specified set of codes
 boolean isTerminologySupported(String terminologyId)
           
 void registerTerminologyServicePlugin(TerminologyServicePlugin terminologyService)
           
 List<Node> retrieve(String expression, org.openehr.rm.datatypes.text.CodePhrase language)
           
 List<Node> retrieveAll(String terminologyId, org.openehr.rm.datatypes.text.CodePhrase language)
           
 List<org.openehr.rm.datatypes.text.DvCodedText> retrieveAllPossibleValues(org.openehr.rm.datatypes.text.CodePhrase attribute, org.openehr.rm.datatypes.text.CodePhrase language)
          Retrieves all possible values of given attribute with labels in specified language
 Node retrieveAllSubclasses(org.openehr.rm.datatypes.text.CodePhrase concept, org.openehr.rm.datatypes.text.CodePhrase language)
          Retrieves all subclasses of given concept with specified language
 String retrieveTerm(org.openehr.rm.datatypes.text.CodePhrase concept, org.openehr.rm.datatypes.text.CodePhrase language)
          Retrieves the term of a given concept in given language
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

init

public void init(InputStream configuration)

getInstance

public static TerminologyService getInstance(InputStream configuration)

isSubclassOf

public boolean isSubclassOf(org.openehr.rm.datatypes.text.CodePhrase a,
                            org.openehr.rm.datatypes.text.CodePhrase b)
                     throws UnsupportedTerminologyException,
                            InvalidCodeException
Description copied from interface: TerminologyService
Checks if codePhrase a is subclass of b with regards to subsumption relationship

Specified by:
isSubclassOf in interface TerminologyService
Returns:
true if a is subclass of b
Throws:
UnsupportedTerminologyException
InvalidCodeException

isSubclassOf

public boolean isSubclassOf(org.openehr.rm.datatypes.text.CodePhrase code,
                            Set<org.openehr.rm.datatypes.text.CodePhrase> codes)
                     throws UnsupportedTerminologyException,
                            InvalidCodeException
Description copied from interface: TerminologyService
Checks if the given code is subclass of any member of specified set of codes

Specified by:
isSubclassOf in interface TerminologyService
Returns:
true if a is subclass of b
Throws:
UnsupportedTerminologyException
InvalidCodeException

isTerminologySupported

public boolean isTerminologySupported(String terminologyId)
Specified by:
isTerminologySupported in interface TerminologyService

retrieveAllSubclasses

public Node retrieveAllSubclasses(org.openehr.rm.datatypes.text.CodePhrase concept,
                                  org.openehr.rm.datatypes.text.CodePhrase language)
                           throws UnsupportedTerminologyException,
                                  UnsupportedLanguageException,
                                  InvalidCodeException
Description copied from interface: TerminologyService
Retrieves all subclasses of given concept with specified language

Specified by:
retrieveAllSubclasses in interface TerminologyService
Returns:
returns a tree representation of subclasses
Throws:
UnsupportedTerminologyException
UnsupportedLanguageException
InvalidCodeException

hasAttributeOfValue

public boolean hasAttributeOfValue(org.openehr.rm.datatypes.text.CodePhrase concept,
                                   org.openehr.rm.datatypes.text.CodePhrase attribute,
                                   org.openehr.rm.datatypes.text.CodePhrase value)
                            throws UnsupportedTerminologyException,
                                   UnknownPropertyException,
                                   UnsupportedLanguageException
Throws:
UnsupportedTerminologyException
UnknownPropertyException
UnsupportedLanguageException

retrieveAllPossibleValues

public List<org.openehr.rm.datatypes.text.DvCodedText> retrieveAllPossibleValues(org.openehr.rm.datatypes.text.CodePhrase attribute,
                                                                                 org.openehr.rm.datatypes.text.CodePhrase language)
                                                                          throws UnsupportedTerminologyException,
                                                                                 UnknownPropertyException,
                                                                                 UnsupportedLanguageException
Description copied from interface: TerminologyService
Retrieves all possible values of given attribute with labels in specified language

Specified by:
retrieveAllPossibleValues in interface TerminologyService
Returns:
a list of coded texts
Throws:
UnsupportedTerminologyException
UnknownPropertyException
UnsupportedLanguageException

retrieveAll

public List<Node> retrieveAll(String terminologyId,
                              org.openehr.rm.datatypes.text.CodePhrase language)
                       throws UnsupportedTerminologyException,
                              UnsupportedLanguageException
Specified by:
retrieveAll in interface TerminologyService
Throws:
UnsupportedTerminologyException
UnsupportedLanguageException

retrieve

public List<Node> retrieve(String expression,
                           org.openehr.rm.datatypes.text.CodePhrase language)
                    throws UnsupportedTerminologyException,
                           UnsupportedLanguageException
Specified by:
retrieve in interface TerminologyService
Throws:
UnsupportedTerminologyException
UnsupportedLanguageException

hasPropertyOfValue

public boolean hasPropertyOfValue(org.openehr.rm.datatypes.text.CodePhrase concept,
                                  org.openehr.rm.datatypes.text.CodePhrase property,
                                  org.openehr.rm.datatypes.text.CodePhrase value)
                           throws UnsupportedTerminologyException,
                                  UnknownPropertyException
Description copied from interface: TerminologyService
Checks if given concept has a named attribute of given value

Specified by:
hasPropertyOfValue in interface TerminologyService
Returns:
true if the property has value
Throws:
UnsupportedTerminologyException
UnknownPropertyException

retrieveTerm

public String retrieveTerm(org.openehr.rm.datatypes.text.CodePhrase concept,
                           org.openehr.rm.datatypes.text.CodePhrase language)
                    throws UnsupportedTerminologyException,
                           UnsupportedLanguageException
Description copied from interface: TerminologyService
Retrieves the term of a given concept in given language

Specified by:
retrieveTerm in interface TerminologyService
Returns:
the term
Throws:
UnsupportedTerminologyException
UnsupportedLanguageException

registerTerminologyServicePlugin

public void registerTerminologyServicePlugin(TerminologyServicePlugin terminologyService)

getSupportedTerminologies

public Collection<String> getSupportedTerminologies()
Specified by:
getSupportedTerminologies in interface TerminologyService


Copyright © 2013 Cambio. All Rights Reserved.