|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jaxfront.core.dom.CodeTables
public class CodeTables
Holds all possible codesets defined in a XML file (codes.xsd) for a specific XMLSchema.Each codeset defines codes and according descriptions in different languages. A code in a codeset may be marked as 'invalid'. An invalid code will be marked as an error in its according view.
XMLSchemaImpl.getCodeTables()
Constructor Summary | |
---|---|
CodeTables(XMLSchema schema)
Creates a CodeTable for a specific XMLSchema out of a String representing an URL. |
Method Summary | |
---|---|
static java.lang.String |
createCacheKey(XMLSchema schema,
java.lang.String url,
java.net.URL xuiURL)
|
static java.util.Hashtable |
createCodeTable(Type source,
org.w3c.dom.Document dom)
Builds a hashtable for all codesets in the passed document object model. |
static java.lang.String |
createKey(boolean checkType,
Type source,
java.lang.String codeSetName,
java.lang.String language)
|
static java.lang.String[] |
extractFromKey(java.lang.String key)
|
java.util.Map |
getAllItems(Type source,
java.lang.String codesetName,
java.lang.String language)
|
java.util.Hashtable |
getCachedURLs()
|
java.lang.String[][] |
getCodeItems(Type source,
java.lang.String codesetName)
Returns all codes belonging to a codeset in the current language. |
static java.net.URL |
getCodeSetHelpURL(java.net.URL codeSetURL,
java.lang.String language,
java.lang.String codeSetName,
java.lang.String code)
|
java.lang.String |
getCodeSetLabel(java.lang.String codeSetName,
java.lang.String language)
|
static java.net.URL |
getCodeSetURL(XMLSchema schema,
java.lang.String url)
|
java.lang.String |
getEntryHelp(Type source,
java.lang.String codesetName,
java.lang.String id,
java.lang.String language)
|
java.lang.String |
getEntryParam(Type source,
java.lang.String codesetName,
java.lang.String id,
java.lang.String language)
|
java.lang.String |
getId(java.lang.String key,
java.lang.String text)
Returns the id (code) for a certain description within a codeset. |
java.lang.String |
getId(Type source,
java.lang.String codesetName,
java.lang.String text,
java.lang.String language)
Returns the id (code) for a certain description within a codeset. |
java.lang.String[] |
getItems(Type source,
java.lang.String codesetName,
java.lang.String language)
Returns all codes belonging to a codeset in the current language. |
java.lang.String |
getText(java.lang.String key,
java.lang.String id)
Returns the description for an id in a certain codeset. |
java.lang.String |
getText(Type source,
java.lang.String codesetName,
java.lang.String id,
java.lang.String language)
Returns the description for an id in a certain codeset. |
java.lang.String[] |
getTextArray(Type source,
java.lang.String name,
java.lang.String[] id,
java.lang.String language)
Returns an array of descriptions for different id's. |
void |
initialize(org.w3c.dom.Document codeSetDocument)
Initializes the codeset with a String representing the codeset file location. |
java.lang.String[] |
initialize(Type source,
java.lang.String codeSetName,
java.io.Reader reader)
Initializes the codeset from an input stream (e.g. a class file that implements the codeset interface). |
java.lang.String[] |
initialize(Type source,
java.lang.String classURL,
java.lang.String codeSetName)
Initializes the codeset from an input stream (e.g. a class file that implements the codeset interface). |
boolean |
initialize(XMLSchema schema,
java.lang.String url)
|
boolean |
initialize(XMLSchema schema,
java.lang.String url,
java.net.URL xuiURL)
Initializes the codeset with a String representing the codeset file location. |
boolean |
isCached(java.lang.String aCodeSetUrl)
|
static boolean |
isValueInvalid(java.lang.String value,
java.lang.String language)
Returns true if the passed value is an invalid code description. |
void |
release()
Release class |
void |
releaseCache()
|
void |
releaseCodeSets()
Releases all loaded codesets for this codetable. |
void |
setLanguage(java.lang.String language)
Sets the current language for the code table. |
java.lang.String |
toXML()
|
static java.util.LinkedHashMap |
transformHashtablesForXMLSerialization(java.util.Hashtable codeSets)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CodeTables(XMLSchema schema)
schema
- the schema which holds this codesetMethod Detail |
---|
public java.lang.String getId(Type source, java.lang.String codesetName, java.lang.String text, java.lang.String language)
codesetName
- name of the codesettext
- description to looking forlanguage
- language to lookup
public java.lang.String getId(java.lang.String key, java.lang.String text)
key
- codeset cache keycodesetName
- name of the codesettext
- description to looking forlanguage
- language to lookup
public java.lang.String[] getItems(Type source, java.lang.String codesetName, java.lang.String language)
codesetName
- name of a codesetlanguage
- current language
public java.util.Map getAllItems(Type source, java.lang.String codesetName, java.lang.String language)
public java.lang.String getCodeSetLabel(java.lang.String codeSetName, java.lang.String language)
public java.lang.String[][] getCodeItems(Type source, java.lang.String codesetName)
codesetName
- name of a codeset
public void setLanguage(java.lang.String language)
public java.lang.String getText(Type source, java.lang.String codesetName, java.lang.String id, java.lang.String language)
codesetName
- name of the codesetid
- id to looking forlanguage
- current language
public java.lang.String getEntryHelp(Type source, java.lang.String codesetName, java.lang.String id, java.lang.String language)
public java.lang.String getEntryParam(Type source, java.lang.String codesetName, java.lang.String id, java.lang.String language)
public java.lang.String getText(java.lang.String key, java.lang.String id)
key
- codeset cache keycodesetName
- name of the codesetid
- id to looking forlanguage
- current language
public java.lang.String[] getTextArray(Type source, java.lang.String name, java.lang.String[] id, java.lang.String language)
codesetName
- name of the codesetid
- id's to looking forlanguage
- current language
public boolean initialize(XMLSchema schema, java.lang.String url)
public boolean initialize(XMLSchema schema, java.lang.String url, java.net.URL xuiURL)
public void initialize(org.w3c.dom.Document codeSetDocument)
public static java.net.URL getCodeSetHelpURL(java.net.URL codeSetURL, java.lang.String language, java.lang.String codeSetName, java.lang.String code)
public java.lang.String[] initialize(Type source, java.lang.String classURL, java.lang.String codeSetName)
public java.lang.String[] initialize(Type source, java.lang.String codeSetName, java.io.Reader reader)
public static java.lang.String createCacheKey(XMLSchema schema, java.lang.String url, java.net.URL xuiURL)
public static java.net.URL getCodeSetURL(XMLSchema schema, java.lang.String url)
public static java.util.Hashtable createCodeTable(Type source, org.w3c.dom.Document dom)
public static java.lang.String createKey(boolean checkType, Type source, java.lang.String codeSetName, java.lang.String language)
public void release()
public void releaseCodeSets()
public static boolean isValueInvalid(java.lang.String value, java.lang.String language)
value
- public java.util.Hashtable getCachedURLs()
public void releaseCache()
public java.lang.String toXML()
public static java.util.LinkedHashMap transformHashtablesForXMLSerialization(java.util.Hashtable codeSets)
public static java.lang.String[] extractFromKey(java.lang.String key)
public boolean isCached(java.lang.String aCodeSetUrl)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |