|
Elexis API documentationVersion 2.1.6 as of December 11 2011 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.elexis.data.PersistentObject
ch.elexis.data.Xid
public class Xid
A XID is an external identifier, that is an ID from en external identifyer system. Examples are entities such as Social Security Number, Passport Number, OID, and others. XID's are not limites to Persons but can be attributed to all kinds of entities. They are usable like OID's but are more general and can integrate other systems. A XID consists of a domain that denotes the identifying system and an ID within this domain. The Domain name is globally unique, while the ID can be globally unique, but might also be unique within its domain only. To differentiate between such "qualities" there is a flag that indicates, that a XID is in fact a GUID. There is also a flag to indicate the range within a xid is valid (e.g. a social security number ist only an identifier within the country where it was created) The Flag ASSIGNMENT_LOCAL means that this XID is used only between different instances of this program, ASSIGNMENT_REGIONAL means a XID used within a country while ASSIGNMENT_GLOBAL a globally used identifier is (e.g. an EAN or an OID) To simplify working with XIDs for the user, a XID Domain can also have a short "nickname" that is valid and unique within the running instance of the program only and that is mapped to a full xid-domain. The Domain "www.xid.ch/id/ean" can be called "EAN". The two namings ar exchangeable within the defining instance, but a XID that leaves this instance of the program must always be named with its full name.
Nested Class Summary | |
---|---|
static class |
Xid.XIDDomain
|
static class |
Xid.XIDException
|
Nested classes/interfaces inherited from class ch.elexis.data.PersistentObject |
---|
PersistentObject.FieldType |
Field Summary | |
---|---|
static int |
ASSIGNMENT_GLOBAL
Quality value for an ID that can be used as global identifier |
static int |
ASSIGNMENT_LOCAL
Quality value for an ID that is valid only in the context of the issuing program |
static int |
ASSIGNMENT_REGIONAL
Quality value for an ID that is valid within a geographic or politic context (e.g. a nationally assigned ID) |
static java.lang.String |
DOMAIN_AHV
|
static java.lang.String |
DOMAIN_AUSTRIAN_PASSPORT
|
static java.lang.String |
DOMAIN_EAN
|
static java.lang.String |
DOMAIN_ELEXIS
|
static java.lang.String |
DOMAIN_GERMAN_PASSPORT
|
static java.lang.String |
DOMAIN_OID
|
static java.lang.String |
DOMAIN_SWISS_PASSPORT
|
static java.lang.String |
FLD_DOMAIN
|
static java.lang.String |
FLD_DOMAIN_ID
|
static java.lang.String |
FLD_OBJECT
|
static java.lang.String |
ID_IN_DOMAIN
|
static java.lang.String |
QUALITY
|
static int |
QUALITY_GUID
Marker that the ID is a GUID (that is, guaranteed to exist only once through time and space) |
static java.lang.String |
TYPE
|
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 | |
---|---|
Xid(PersistentObject o,
java.lang.String domain,
java.lang.String domain_id)
create a new XID. |
Method Summary | |
---|---|
static PersistentObject |
findObject(java.lang.String domain,
java.lang.String id)
Find a PersistentObject from a domain and a domain_id |
static Xid |
findXID(PersistentObject o,
java.lang.String domain)
Find the Xid of a given domain for the given Object |
static Xid |
findXID(java.lang.String domain,
java.lang.String id)
Find a XID from a domain and a domain_id |
java.lang.String |
getDomain()
get the Domain this Xid is from |
static Xid.XIDDomain |
getDomain(java.lang.String name)
|
java.lang.String |
getDomainId()
get the id of this Xid in its domain |
java.lang.String |
getLabel()
Einen menschenlesbaren Identifikationsstring für dieses Objet liefern |
PersistentObject |
getObject()
Get the object that is identified with this XID |
int |
getQuality()
Get the quality of this xid |
static java.lang.String |
getSimpleNameForXIDDomain(java.lang.String domain)
|
static java.lang.Integer |
getXIDDomainQuality(java.lang.String xidDomain)
Get the ID quality of an Object of a given domain |
static java.util.Set<java.lang.String> |
getXIDDomains()
return a list of all known domains |
boolean |
isGUID()
Tell whether this XID is a GUID |
static Xid |
load(java.lang.String id)
|
static boolean |
localRegisterXIDDomain(java.lang.String domain,
java.lang.String simpleName,
int quality)
Register a new domain for use with our XID System locally (this will not affect the central XID registry at www.xid.ch) |
static boolean |
localRegisterXIDDomainIfNotExists(java.lang.String domain,
java.lang.String simpleName,
int quality)
Register a local xid domain if it does not exist. |
Methods inherited from class ch.elexis.data.PersistentObject |
---|
addChangeListener, addSticker, addToList, addXid, begin, checkNull, checkZero, checkZeroDouble, clearCache, connect, connect, delete, 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 |
Methods inherited from interface ch.elexis.core.data.IXid |
---|
getId |
Field Detail |
---|
public static final java.lang.String QUALITY
public static final java.lang.String ID_IN_DOMAIN
public static final java.lang.String TYPE
public static final int ASSIGNMENT_LOCAL
public static final int ASSIGNMENT_REGIONAL
public static final int ASSIGNMENT_GLOBAL
public static final int QUALITY_GUID
public static final java.lang.String DOMAIN_ELEXIS
public static final java.lang.String DOMAIN_AHV
public static final java.lang.String DOMAIN_SWISS_PASSPORT
public static final java.lang.String DOMAIN_AUSTRIAN_PASSPORT
public static final java.lang.String DOMAIN_GERMAN_PASSPORT
public static final java.lang.String DOMAIN_EAN
public static final java.lang.String DOMAIN_OID
public static final java.lang.String FLD_OBJECT
public static final java.lang.String FLD_DOMAIN_ID
public static final java.lang.String FLD_DOMAIN
Constructor Detail |
---|
public Xid(PersistentObject o, java.lang.String domain, java.lang.String domain_id) throws Xid.XIDException
o
- the object to identify with the new XIDdomain
- the domain from wich the identifier is (e.g. DOMAIN_COVERCARD). Must be a
registered domaindomain_id
- the id from that domain that identifies the objectquality
- the quality of this identifier
Xid.XIDException
- if a XID with same domain and domain_id but different object or quality already
exists. if the domain was not rgeisteredMethod Detail |
---|
public int getQuality()
getQuality
in interface IXid
public boolean isGUID()
isGUID
in interface IXid
public java.lang.String getDomain()
getDomain
in interface IXid
public java.lang.String getDomainId()
getDomainId
in interface IXid
public PersistentObject getObject()
getObject
in interface IXid
public java.lang.String getLabel()
PersistentObject
getLabel
in interface IPersistentObject
getLabel
in interface IXid
getLabel
in class PersistentObject
public static Xid load(java.lang.String id)
public static Xid findXID(java.lang.String domain, java.lang.String id)
domain
- the domain to search an id from, Can be full name or local short name of the
domainid
- the id out of domain to retrieve
public static PersistentObject findObject(java.lang.String domain, java.lang.String id)
domain
- the domain to search an id from (e.g. www.ahv.ch)id
- the id out of domain to retrieve
public static Xid findXID(PersistentObject o, java.lang.String domain)
o
- the object whose Xid should be finddomain
- the domain the Xid should be from
public static boolean localRegisterXIDDomain(java.lang.String domain, java.lang.String simpleName, int quality)
domain
- the domain to registerquality
- the quality an ID of that domain will have
public static boolean localRegisterXIDDomainIfNotExists(java.lang.String domain, java.lang.String simpleName, int quality)
domain
- name of the domainsimpleName
- short name for the domainquality
- the wuality of an ID of that domain will have
public static java.lang.Integer getXIDDomainQuality(java.lang.String xidDomain)
xidDomain
- the domain to query
public static java.lang.String getSimpleNameForXIDDomain(java.lang.String domain)
public static Xid.XIDDomain getDomain(java.lang.String name)
public static java.util.Set<java.lang.String> getXIDDomains()
|
Elexis API documentationVersion 2.1.6 as of December 11 2011 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |