|
DLESE Tools v1.6.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.dlese.dpc.schemedit.vocab.layout.VocabLayoutConfig
public class VocabLayoutConfig
Populates the a groupInfoMap by reading from a file specified in Framework config file (with name ending in "fields-list.xml"). The fields-list file contains a list of relative URIs that can be used to calculate the absolute URI to the individual fields files.
E.g.,
#getFieldsFileUri(URI, String)
.
Field Summary | |
---|---|
protected String |
configPath
|
protected HashMap |
map
|
Constructor Summary | |
---|---|
VocabLayoutConfig()
Constructor for the VocabLayoutConfig object |
|
VocabLayoutConfig(File configIndexFile)
Constructor for the VocabLayoutConfig object |
|
VocabLayoutConfig(String configIndexPath)
|
Method Summary | |
---|---|
List |
getAllVocabLayout()
Gets all the VocabLayouts as a list. |
List |
getFields()
Gets all the fields (xpaths) having VocabLayouts |
URI |
getFieldsFileUri(String relativePath)
Gets an absolute URI be resolving a baseUri (pointing to the groups-list file) and a relativePath. |
Set |
getKeySet()
Gets the keySet attribute of the VocabLayoutMap object |
VocabLayout |
getVocabLayout(String xpath)
|
boolean |
hasVocabLayout(String xpath)
Returns true if there is a VocabLayout present for the specified xpath. |
void |
init()
Read a listing of URIs Fields files from directoryUri and then loads each of the listed files as VocabLayout objects, which are stored in a map. |
static void |
main(String[] args)
Read a set of groups files |
protected static void |
prtln(String s)
Output a line of text to standard out, with datestamp, if debug is set to true. |
void |
putVocabLayout(String xpath,
VocabLayout reader)
Add a VocabLayout to the map. |
void |
reload()
Reload all the VocabLayouts in the map |
void |
removeVocabLayout(String xpath)
|
static void |
setDebug(boolean d)
|
String |
toString()
Description of the Method |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected HashMap map
protected String configPath
Constructor Detail |
---|
public VocabLayoutConfig()
public VocabLayoutConfig(String configIndexPath)
public VocabLayoutConfig(File configIndexFile)
uri
- NOT YET DOCUMENTEDMethod Detail |
---|
public void putVocabLayout(String xpath, VocabLayout reader)
xpath
- Description of the Parameterreader
- Description of the Parameterpublic VocabLayout getVocabLayout(String xpath)
public void removeVocabLayout(String xpath)
public Set getKeySet()
public void reload() throws Exception
Exception
- Description of the Exceptionpublic List getAllVocabLayout()
public List getFields()
public boolean hasVocabLayout(String xpath)
xpath
- Description of the Parameter
public String toString()
toString
in class Object
public void init() throws Exception
Exception
- Description of the Exceptionpublic URI getFieldsFileUri(String relativePath) throws Exception
The first two parts of the relative path form a format, version key. E.g. for relativePath "annotation/1.0.00/fields/annotation-anno-fields-en-us.xml" the key is "annotation", "1.0.00". To form an absolute fieldsFileUri, the part of the baseUri above the key are joined with the relativePath.
Exceptions are thrown if the relativePath does not contain a key, or if the baseUri does not contain the key specified by the relativePath.
baseUri
- baseUri pointing to a fields-list filerelativePath
- a relative path containing a framework, version key and the name of the fields
file.
Exception
- if absoluteFieldsFileUri cannot be computedpublic static void main(String[] args) throws Exception
args
- The command line arguments
Exception
- Description of the Exceptionpublic static void setDebug(boolean d)
protected static void prtln(String s)
s
- The String that will be output.
|
DLESE Tools v1.6.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |