Class VocabLayoutConfig
java.lang.Object
org.dlese.dpc.schemedit.vocab.layout.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.,
- the fields-list for dlese_anno format is http://www.dlese.org/Metadata/annotation/1.0.00/build/fields-list.xml.
- within the fields-list file a relative URI is: annotation/1.0.00/fields/annotation-anno-fields-en-us.xml
- the absolute uri to this field file is: http://www.dlese.org/Metadata/annotation/1.0.00/fields/annotation-anno-fields-en-us.xml.
The resolution of absolute Uris is done in
.
invalid reference
#getFieldsFileUri(URI, String)
- Author:
- ostwald
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for the VocabLayoutConfig objectVocabLayoutConfig(File configIndexFile) Constructor for the VocabLayoutConfig objectVocabLayoutConfig(String configIndexPath) -
Method Summary
Modifier and TypeMethodDescriptionGets all the VocabLayouts as a list.Gets all the fields (xpaths) having VocabLayoutsgetFieldsFileUri(String relativePath) Gets an absolute URI be resolving a baseUri (pointing to the groups-list file) and a relativePath.Gets the keySet attribute of the VocabLayoutMap objectgetVocabLayout(String xpath) booleanhasVocabLayout(String xpath) Returns true if there is a VocabLayout present for the specified xpath.voidinit()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 voidRead a set of groups filesprotected static voidOutput a line of text to standard out, with datestamp, if debug is set to true.voidputVocabLayout(String xpath, VocabLayout reader) Add a VocabLayout to the map.voidreload()Reload all the VocabLayouts in the mapvoidremoveVocabLayout(String xpath) static voidsetDebug(boolean d) toString()Description of the Method
-
Field Details
-
map
-
configPath
-
-
Constructor Details
-
VocabLayoutConfig
public VocabLayoutConfig()Constructor for the VocabLayoutConfig object -
VocabLayoutConfig
-
VocabLayoutConfig
Constructor for the VocabLayoutConfig object- Parameters:
uri- NOT YET DOCUMENTED
-
-
Method Details
-
putVocabLayout
Add a VocabLayout to the map.- Parameters:
xpath- Description of the Parameterreader- Description of the Parameter
-
getVocabLayout
-
removeVocabLayout
-
getKeySet
Gets the keySet attribute of the VocabLayoutMap object- Returns:
- The keySet value
-
reload
Reload all the VocabLayouts in the map- Throws:
Exception- Description of the Exception
-
getAllVocabLayout
Gets all the VocabLayouts as a list.- Returns:
- a List of VocabLayouts
-
getFields
Gets all the fields (xpaths) having VocabLayouts- Returns:
- a list of xpaths to Fields
-
hasVocabLayout
Returns true if there is a VocabLayout present for the specified xpath.- Parameters:
xpath- Description of the Parameter- Returns:
- Description of the Return Value
-
toString
Description of the Method -
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.- Throws:
Exception- Description of the Exception
-
getFieldsFileUri
Gets an absolute URI be resolving a baseUri (pointing to the groups-list file) and a relativePath.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.
- Parameters:
relativePath- a relative path containing a framework, version key and the name of the fields file.baseUri- baseUri pointing to a fields-list file- Returns:
- an absolute groupsFileUri
- Throws:
Exception- if absoluteFieldsFileUri cannot be computed
-
main
Read a set of groups files- Parameters:
args- The command line arguments- Throws:
Exception- Description of the Exception
-
setDebug
public static void setDebug(boolean d) -
prtln
Output a line of text to standard out, with datestamp, if debug is set to true.- Parameters:
s- The String that will be output.
-