se.cambio.cds.ts
Class DummyTerminologyServicePlugin

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

public class DummyTerminologyServicePlugin
extends Object
implements TerminologyServicePlugin


Constructor Summary
DummyTerminologyServicePlugin(String terminologyId, int maxCodeSize)
           
 
Method Summary
 Collection<String> getSupportedTerminologies()
           
 String getTerminologyId()
           
 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 br)
           
 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 registerDescription(String code, String description)
           
 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 property, 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
 

Constructor Detail

DummyTerminologyServicePlugin

public DummyTerminologyServicePlugin(String terminologyId,
                                     int maxCodeSize)
Method Detail

getTerminologyId

public String getTerminologyId()
Specified by:
getTerminologyId in interface TerminologyServicePlugin

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

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

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

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

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

retrieveAllPossibleValues

public List<org.openehr.rm.datatypes.text.DvCodedText> retrieveAllPossibleValues(org.openehr.rm.datatypes.text.CodePhrase property,
                                                                                 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

isTerminologySupported

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

registerDescription

public void registerDescription(String code,
                                String description)

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

init

public void init(InputStream br)
Specified by:
init in interface TerminologyServicePlugin

getSupportedTerminologies

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


Copyright © 2013 Cambio. All Rights Reserved.