Elexis API documentation
Version 2.1.6 as of December 11 2011

ch.elexis.exchange
Class XChangeContainer

java.lang.Object
  extended by ch.elexis.exchange.XChangeContainer

public class XChangeContainer
extends java.lang.Object


Nested Class Summary
static class XChangeContainer.UserChoice
          A UserChoice contains the information, whether the user selected the associated object for transfer
 
Field Summary
static java.lang.String ATTR_CREATOR_NAME
           
static java.lang.String ATTR_DESTINATION
           
static java.lang.String ATTR_LANGUAGE
           
static java.lang.String ATTR_ORIGIN
           
static java.lang.String ATTR_RESPONSIBLE
           
static java.lang.String ATTR_TIMESTAMP
           
static java.lang.String ENCLOSE_CONTACTS
           
static java.lang.String ENCLOSE_DOCUMENTS
           
static java.lang.String ENCLOSE_EPISODES
           
static java.lang.String ENCLOSE_FINDINGS
           
static java.lang.String ENCLOSE_MEDICATIONS
           
static java.lang.String ENCLOSE_RECORDS
           
static java.lang.String ENCLOSE_RISKS
           
static Namespace ns
           
static Namespace nsschema
           
static Namespace nsxsi
           
static java.lang.String ROOT_ELEMENT
           
static java.lang.String ROOTPATH
           
static java.lang.String Version
           
 
Constructor Summary
XChangeContainer()
           
 
Method Summary
 void addChoice(Element key, java.lang.String name)
           
 void addChoice(Element e, java.lang.String name, java.lang.Object o)
           
 void addChoice(XChangeElement e, java.lang.String name, java.lang.Object o)
           
 void addMapping(XChangeElement element, PersistentObject obj)
          Map a database object to an xChange container element and vice versa
 java.util.Iterator<java.util.Map.Entry<java.lang.String,byte[]>> getBinaries()
          get an Iterator over all binary contents of this Container
 byte[] getBinary(java.lang.String id)
          get a binary content from the Container
 XChangeContainer.UserChoice getChoice(Element key)
           
 XChangeContainer.UserChoice getChoice(XChangeElement key)
          Retrieve the UserChoice attributed to a given Element
 java.util.List<Element> getContactElements()
           
 ContactsElement getContactsElement()
           
 Document getDocument()
           
 java.util.List<Element> getElements(java.lang.String path)
          Retrieve a List of all Elements with a given Name at a given path
 XChangeElement getMapping(PersistentObject obj)
          return the Container Element that is mapped to a specified database object
 PersistentObject getMapping(XChangeElement element)
          Return the database Object that maps to a specified Element
 Namespace getNamespace()
           
 java.lang.String getProperty(java.lang.String name)
           
 Element getRoot()
          Get the root element.
 java.util.List<IConfigurationElement> getXChangeContributors()
           
 boolean isValid()
           
 void setConfiguration(java.util.Properties props)
          Set any implementation-spezific configuration
 void setDocument(Document doc)
           
 void setProperty(java.lang.String name, java.lang.String value)
          Set a named property for this container
 void setValid(boolean bValid)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

Version

public static final java.lang.String Version
See Also:
Constant Field Values

ATTR_LANGUAGE

public static final java.lang.String ATTR_LANGUAGE
See Also:
Constant Field Values

ATTR_CREATOR_NAME

public static final java.lang.String ATTR_CREATOR_NAME
See Also:
Constant Field Values

ATTR_RESPONSIBLE

public static final java.lang.String ATTR_RESPONSIBLE
See Also:
Constant Field Values

ATTR_DESTINATION

public static final java.lang.String ATTR_DESTINATION
See Also:
Constant Field Values

ATTR_ORIGIN

public static final java.lang.String ATTR_ORIGIN
See Also:
Constant Field Values

ATTR_TIMESTAMP

public static final java.lang.String ATTR_TIMESTAMP
See Also:
Constant Field Values

ns

public static final Namespace ns

nsxsi

public static final Namespace nsxsi

nsschema

public static final Namespace nsschema

ROOT_ELEMENT

public static final java.lang.String ROOT_ELEMENT
See Also:
Constant Field Values

ROOTPATH

public static final java.lang.String ROOTPATH
See Also:
Constant Field Values

ENCLOSE_CONTACTS

public static final java.lang.String ENCLOSE_CONTACTS
See Also:
Constant Field Values

ENCLOSE_DOCUMENTS

public static final java.lang.String ENCLOSE_DOCUMENTS
See Also:
Constant Field Values

ENCLOSE_RECORDS

public static final java.lang.String ENCLOSE_RECORDS
See Also:
Constant Field Values

ENCLOSE_FINDINGS

public static final java.lang.String ENCLOSE_FINDINGS
See Also:
Constant Field Values

ENCLOSE_MEDICATIONS

public static final java.lang.String ENCLOSE_MEDICATIONS
See Also:
Constant Field Values

ENCLOSE_RISKS

public static final java.lang.String ENCLOSE_RISKS
See Also:
Constant Field Values

ENCLOSE_EPISODES

public static final java.lang.String ENCLOSE_EPISODES
See Also:
Constant Field Values
Constructor Detail

XChangeContainer

public XChangeContainer()
Method Detail

setDocument

public void setDocument(Document doc)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getDocument

public Document getDocument()

isValid

public boolean isValid()

setValid

public void setValid(boolean bValid)

getXChangeContributors

public java.util.List<IConfigurationElement> getXChangeContributors()

addMapping

public void addMapping(XChangeElement element,
                       PersistentObject obj)
Map a database object to an xChange container element and vice versa

Parameters:
element - the Element
obj - the Object

getMapping

public PersistentObject getMapping(XChangeElement element)
Return the database Object that maps to a specified Element

Parameters:
element - the Element
Returns:
the object or null if no such mapping exists

getMapping

public XChangeElement getMapping(PersistentObject obj)
return the Container Element that is mapped to a specified database object

Parameters:
obj - the object
Returns:
the element or null if no such mapping exists

getChoice

public XChangeContainer.UserChoice getChoice(XChangeElement key)
Retrieve the UserChoice attributed to a given Element

Parameters:
key - teh element
Returns:
the UserChoice or null if no such UserChoice exists

getChoice

public XChangeContainer.UserChoice getChoice(Element key)

addChoice

public void addChoice(Element key,
                      java.lang.String name)

getContactsElement

public ContactsElement getContactsElement()

getContactElements

public java.util.List<Element> getContactElements()

getBinary

public byte[] getBinary(java.lang.String id)
get a binary content from the Container

Parameters:
id - id of the content
Returns:
the content or null if no such content exists

addChoice

public void addChoice(XChangeElement e,
                      java.lang.String name,
                      java.lang.Object o)

addChoice

public void addChoice(Element e,
                      java.lang.String name,
                      java.lang.Object o)

getRoot

public Element getRoot()
Get the root element.

Returns:
the root element

getElements

public java.util.List<Element> getElements(java.lang.String path)
Retrieve a List of all Elements with a given Name at a given path

Parameters:
path - a string of the form /element1/element2/name will get all Elements with "name" in the body of element2. If name is *, will retrieve all Children of element2. Path must begin at root level.
Returns:
a possibly empty list af all matching elements at the given position

getNamespace

public Namespace getNamespace()

getBinaries

public java.util.Iterator<java.util.Map.Entry<java.lang.String,byte[]>> getBinaries()
get an Iterator over all binary contents of this Container


setConfiguration

public void setConfiguration(java.util.Properties props)
Set any implementation-spezific configuration

Parameters:
props -

setProperty

public void setProperty(java.lang.String name,
                        java.lang.String value)
Set a named property for this container

Parameters:
name - the name of the property
value - the value for the property

getProperty

public java.lang.String getProperty(java.lang.String name)

Elexis API documentation
Version 2.1.6 as of December 11 2011

Copyright 2005-2011 by Gerry Weirich, Elexis