Elexis API documentation
Version 2.1.6 as of December 11 2011

ch.elexis.omnivore.data
Class DocHandle

java.lang.Object
  extended by ch.elexis.data.PersistentObject
      extended by ch.elexis.omnivore.data.DocHandle
All Implemented Interfaces:
IPersistentObject, ISelectable, IOpaqueDocument

public class DocHandle
extends PersistentObject
implements IOpaqueDocument


Nested Class Summary
 
Nested classes/interfaces inherited from class ch.elexis.data.PersistentObject
PersistentObject.FieldType
 
Field Summary
static java.lang.String createDB
           
static java.lang.String DBVERSION
           
static java.lang.String TABLENAME
           
static java.lang.String upd120
           
 
Fields inherited from class ch.elexis.data.PersistentObject
CACHE_DEFAULT_LIFETIME, CACHE_MIN_LIFETIME, CFG_CONNECTSTRING, CFG_DRIVER, CFG_PWD, CFG_TYPE, CFG_USER, DELETED, EXISTS, INEXISTENT, INVALID_ID, MATCH_AUTO, MATCH_CONTAINS, MATCH_EXACT, MATCH_REGEXP, MATCH_START
 
Fields inherited from interface ch.elexis.core.data.IPersistentObject
FLD_DATE, FLD_DELETED, FLD_EXTINFO, FLD_ID, FLD_LASTUPDATE, STATE_EXISTING, STATE_INEXISTENT, STATE_INVALID_ID
 
Constructor Summary
DocHandle(byte[] doc, Patient pat, java.lang.String title, java.lang.String mime, java.lang.String keyw)
           
 
Method Summary
static void assimilate(java.lang.String f)
           
 boolean delete()
          Ein Objekt und ggf. dessen XID's aus der Datenbank löschen the object is not deleted but rather marked as deleted.
 void execute()
           
 java.lang.String getCategory()
          Category of the document.
 byte[] getContentsAsBytes()
          A representation of the contents as byte array
 java.io.InputStream getContentsAsStream()
          A representation of the contents a stream
 java.lang.String getCreationDate()
          Date this document was created
 java.lang.String getGUID()
          A globally unique identifier for this document.
 java.lang.String getKeywords()
          Arbitrary keywords for this document
 java.lang.String getLabel()
          Einen menschenlesbaren Identifikationsstring für dieses Objet liefern
 java.lang.String getMimeType()
          Mime-Type of the contents.
 java.lang.String getPatientID()
          The Patient this document belongs to.
 java.lang.String getTitle()
          Title for the document.
static void init()
          Tabelle neu erstellen
static DocHandle load(java.lang.String id)
           
 
Methods inherited from class ch.elexis.data.PersistentObject
addChangeListener, addSticker, addToList, addXid, begin, checkNull, checkZero, checkZeroDouble, clearCache, connect, connect, deleteList, disconnect, equals, executeSQLScript, exists, exportData, fireChangeEvent, flatten, fold, get, get, getCacheTime, getConnection, getDefaultCacheLifetime, getFieldType, getId, getInt, getLastUpdate, getList, getList, getMap, getSticker, getStickers, getWrappedId, getXid, getXid, getXids, hashCode, isAvailable, isDeleted, isDragOK, isMatching, isMatching, isMatching, isMatching, isShowDeleted, isValid, lock, map, relock, removeChangeListener, removeFromList, removeFromList, removeSticker, resetCache, set, set, setDefaultCacheLifetime, setInt, setMap, setShowDeleted, setTrace, state, storeToString, tableExists, ts, undelete, unlock
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TABLENAME

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

DBVERSION

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

createDB

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

upd120

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

DocHandle

public DocHandle(byte[] doc,
                 Patient pat,
                 java.lang.String title,
                 java.lang.String mime,
                 java.lang.String keyw)
Method Detail

init

public static void init()
Tabelle neu erstellen


load

public static DocHandle load(java.lang.String id)

getLabel

public java.lang.String getLabel()
Description copied from class: PersistentObject
Einen menschenlesbaren Identifikationsstring für dieses Objet liefern

Specified by:
getLabel in interface IPersistentObject
Specified by:
getLabel in class PersistentObject

delete

public boolean delete()
Description copied from class: PersistentObject
Ein Objekt und ggf. dessen XID's aus der Datenbank löschen the object is not deleted but rather marked as deleted. A purge must be applied to remove the object really

Overrides:
delete in class PersistentObject
Returns:
true on success

getContentsAsBytes

public byte[] getContentsAsBytes()
Description copied from interface: IOpaqueDocument
A representation of the contents as byte array

Specified by:
getContentsAsBytes in interface IOpaqueDocument
Returns:
a byte array with the original contents

getContentsAsStream

public java.io.InputStream getContentsAsStream()
Description copied from interface: IOpaqueDocument
A representation of the contents a stream

Specified by:
getContentsAsStream in interface IOpaqueDocument
Returns:
an InpputStream

execute

public void execute()

assimilate

public static void assimilate(java.lang.String f)

getTitle

public java.lang.String getTitle()
Description copied from interface: IOpaqueDocument
Title for the document. Not more than 80 characters. Must not be null and must not be empty

Specified by:
getTitle in interface IOpaqueDocument

getMimeType

public java.lang.String getMimeType()
Description copied from interface: IOpaqueDocument
Mime-Type of the contents.

Specified by:
getMimeType in interface IOpaqueDocument
Returns:
The MimeType (see rfc2045) of the document. May be null or empty if not known

getKeywords

public java.lang.String getKeywords()
Description copied from interface: IOpaqueDocument
Arbitrary keywords for this document

Specified by:
getKeywords in interface IOpaqueDocument
Returns:
null or empty or a list of keywords, separated by comma or space

getCategory

public java.lang.String getCategory()
Description copied from interface: IOpaqueDocument
Category of the document. This is an arbitrary, user-defined String

Specified by:
getCategory in interface IOpaqueDocument
Returns:
null or empty or the category for this document

getCreationDate

public java.lang.String getCreationDate()
Description copied from interface: IOpaqueDocument
Date this document was created

Specified by:
getCreationDate in interface IOpaqueDocument
Returns:
a date in ISO Format. Never null

getPatientID

public java.lang.String getPatientID()
Description copied from interface: IOpaqueDocument
The Patient this document belongs to.

Specified by:
getPatientID in interface IOpaqueDocument
Returns:
A Patient-ID or null if the document does not belong to a patient.

getGUID

public java.lang.String getGUID()
Description copied from interface: IOpaqueDocument
A globally unique identifier for this document. The implementation must ensure that (1) No two documents in the world ever exist with the same GUID, and (2) A document will always have the same GUID assigned within this application, i.e. the call getGUID on the same document will always return the same value.

Specified by:
getGUID in interface IOpaqueDocument
Returns:

Elexis API documentation
Version 2.1.6 as of December 11 2011

Copyright 2005-2011 by Gerry Weirich, Elexis