DLESE Tools
v1.6.0

org.dlese.dpc.schemedit.vocab
Class NewFieldInfoMap

java.lang.Object
  extended by org.dlese.dpc.schemedit.vocab.FieldInfoMap
      extended by org.dlese.dpc.schemedit.vocab.NewFieldInfoMap

public class NewFieldInfoMap
extends FieldInfoMap

Populates the a fieldInfoMap 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.,

Author:
ostwald

Field Summary
 
Fields inherited from class org.dlese.dpc.schemedit.vocab.FieldInfoMap
directoryUri, map
 
Constructor Summary
NewFieldInfoMap()
          Constructor for the NewFieldInfoMap object
NewFieldInfoMap(String uri)
          Constructor for the NewFieldInfoMap object
 
Method Summary
static URI getFieldsFileUri(URI baseUri, String relativePath)
          Gets an absolute URI be resolving a baseUri (pointing to the fields-list file) and a relativePath.
 void init()
          Read a listing of URIs Fields files from directoryUri and then loads each of the listed files as FieldInfoReader objects, which are stored in a map.
protected static void prtln(String s)
          Output a line of text to standard out, with datestamp, if debug is set to true.
 
Methods inherited from class org.dlese.dpc.schemedit.vocab.FieldInfoMap
getAllFieldInfo, getFieldInfo, getFields, getKeySet, hasFieldInfo, putFieldInfo, reload, removeFieldInfo, setDebug, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NewFieldInfoMap

public NewFieldInfoMap()
Constructor for the NewFieldInfoMap object


NewFieldInfoMap

public NewFieldInfoMap(String uri)
Constructor for the NewFieldInfoMap object

Parameters:
uri - NOT YET DOCUMENTED
Method Detail

init

public void init()
          throws Exception
Read a listing of URIs Fields files from directoryUri and then loads each of the listed files as FieldInfoReader objects, which are stored in a map.

Specified by:
init in class FieldInfoMap
Throws:
Exception - Description of the Exception

getFieldsFileUri

public static URI getFieldsFileUri(URI baseUri,
                                   String relativePath)
                            throws Exception
Gets an absolute URI be resolving a baseUri (pointing to the fields-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:
baseUri - baseUri pointing to a fields-list file
relativePath - a relative path containing a framework, version key and the name of the fields file.
Returns:
an absolute fieldsFileUri
Throws:
Exception - if absoluteFieldsFileUri cannot be computed

prtln

protected static void prtln(String s)
Output a line of text to standard out, with datestamp, if debug is set to true.

Parameters:
s - The String that will be output.

DLESE Tools
v1.6.0