VdexReload 1.1.3 API

uk.ac.reload.moonunit.schema
Class ReloadVocabularyList

java.lang.Object
  extended byuk.ac.reload.moonunit.schema.ReloadVocabularyList

public class ReloadVocabularyList
extends java.lang.Object

A Reload Vocabulary List - A String list and default value


Field Summary
protected static java.lang.String DEFAULT_VDEX_VOCAB
          Vdex vocabulary file with a default list name
protected  java.lang.String[] defaultList
          The Default String list, initialised to an Empty list
protected  java.lang.String defaultListName
          The default vocabulary list name if we are using Vdex files
protected  java.lang.String defaultValue
          The default value
protected  DomPath domPath
          The path mapping
protected static java.lang.String INTERNAL_LISTNAME
           
protected static java.lang.String LANG_LISTNAME
           
protected  java.lang.String[] list
          The Actual String list, initialised to an Empty list
protected  java.lang.String listName
          The list name.
protected  java.lang.String purposeValue
          The LOM Element lom/classification/purpose/value/langstring Value.
protected static java.lang.String[] TF_LIST
          True / False vocabulary list
protected static java.lang.String TRUEFALSE_LISTNAME
           
protected static java.lang.String VDEX_VOCAB
          Vdex vocabulary file without a default list name
protected static java.lang.String[] YESNO_LIST
          Yes / No list
protected static java.lang.String YESNO_LISTNAME
           
 
Constructor Summary
ReloadVocabularyList()
          Default constructor
ReloadVocabularyList(DomPath domPath, java.lang.String listName)
          Constructor
 
Method Summary
 void addReloadVocabularyListener(ReloadVocabularyListener listener)
          Add a ReloadVocabularyListener
 void fireElementChanged(ReloadVocabularyListenerEvent event)
          Tell our listeners that we have changed the vocabulary list
 java.lang.String getDefaultValue()
          Get the default value of this vocab list
 DomPath getDomPath()
          Get the DomPath
 java.lang.String[] getList()
          Get the Vocab list.
 java.lang.String[] getListFromVdexSource(java.lang.String vocabSource, java.lang.String elementName)
          Get the vocabulary list items from a Vdex file.
 java.lang.String getListName()
          Get the Name of the List
 boolean isLangList()
          Determine if this list is a language list.
 void removeReloadVocabularyListener(ReloadVocabularyListener listener)
          Remove a ReloadVocabularyListener
 void setDefaultList(java.lang.String[] list)
          Set the Default Vocabulary List
 void setDefaultListName(java.lang.String defaultListName)
          Set the default listName for this vocab list
 void setDefaultValue(java.lang.String defaultValue)
          Set the default value for this vocab list
 void setList(java.lang.String[] list)
          Set the Vocabulary List
 void setListUsingVocabSource(java.lang.Object source, java.lang.String vocabSource, org.jdom.Element valueElement)
          Set the vocabulary list depending on the vocabulary source value.
 void updateTaxonPathSourceListUsingPurposeValue(java.lang.Object source, java.lang.String purposeValue)
          Update the LOM lom/classification/taxonpath/source/langstring element's vocabulary list depending on the value of the Purpose element lom/classification/purpose/value/langstring.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INTERNAL_LISTNAME

protected static java.lang.String INTERNAL_LISTNAME

LANG_LISTNAME

protected static java.lang.String LANG_LISTNAME

YESNO_LISTNAME

protected static java.lang.String YESNO_LISTNAME

TRUEFALSE_LISTNAME

protected static java.lang.String TRUEFALSE_LISTNAME

YESNO_LIST

protected static java.lang.String[] YESNO_LIST
Yes / No list


TF_LIST

protected static java.lang.String[] TF_LIST
True / False vocabulary list


VDEX_VOCAB

protected static java.lang.String VDEX_VOCAB
Vdex vocabulary file without a default list name


DEFAULT_VDEX_VOCAB

protected static java.lang.String DEFAULT_VDEX_VOCAB
Vdex vocabulary file with a default list name


domPath

protected DomPath domPath
The path mapping


listName

protected java.lang.String listName
The list name. If the list comes from the Schema, this should be set to "internal" or can be set to one of the special list names like "lang" or "yesno"


defaultListName

protected java.lang.String defaultListName
The default vocabulary list name if we are using Vdex files


list

protected java.lang.String[] list
The Actual String list, initialised to an Empty list


defaultList

protected java.lang.String[] defaultList
The Default String list, initialised to an Empty list


defaultValue

protected java.lang.String defaultValue
The default value


purposeValue

protected java.lang.String purposeValue
The LOM Element lom/classification/purpose/value/langstring Value. The value entered for this element is useful for automatically updating the lom/classification/taxonpath/source/langstring list.

Constructor Detail

ReloadVocabularyList

public ReloadVocabularyList()
Default constructor


ReloadVocabularyList

public ReloadVocabularyList(DomPath domPath,
                            java.lang.String listName)
Constructor

Parameters:
domPath - the node path bound to this vocabulary list
listName - the list name
Method Detail

getDomPath

public DomPath getDomPath()
Get the DomPath

Returns:
the node path bound to this vocabulary list

setList

public void setList(java.lang.String[] list)
Set the Vocabulary List

Parameters:
list - the vocabulary list

setDefaultList

public void setDefaultList(java.lang.String[] list)
Set the Default Vocabulary List

Parameters:
list - the default vocabulary list

getList

public java.lang.String[] getList()
Get the Vocab list. It will at least be an array of one empty String

Returns:
the vocabulary list

getListName

public java.lang.String getListName()
Get the Name of the List

Returns:
the name of the list

setDefaultListName

public void setDefaultListName(java.lang.String defaultListName)
Set the default listName for this vocab list

Parameters:
defaultListName - the default list name to be given for this vocab list

isLangList

public boolean isLangList()
Determine if this list is a language list.

Returns:
true if this is a language list, false otherwise

setDefaultValue

public void setDefaultValue(java.lang.String defaultValue)
Set the default value for this vocab list

Parameters:
defaultValue - the default value to be set for this vocab list

getDefaultValue

public java.lang.String getDefaultValue()
Get the default value of this vocab list

Returns:
the default value of this vocab list

setListUsingVocabSource

public void setListUsingVocabSource(java.lang.Object source,
                                    java.lang.String vocabSource,
                                    org.jdom.Element valueElement)
Set the vocabulary list depending on the vocabulary source value. If the source is a Vdex file, then get the list items from this file.

Parameters:
source - who is telling us this
vocabSource - the vocabulary source value
valueElement - the element that will be bound to this vocabulary list

updateTaxonPathSourceListUsingPurposeValue

public void updateTaxonPathSourceListUsingPurposeValue(java.lang.Object source,
                                                       java.lang.String purposeValue)
Update the LOM lom/classification/taxonpath/source/langstring element's vocabulary list depending on the value of the Purpose element lom/classification/purpose/value/langstring.

Parameters:
source - who is telling us this
purposeValue - the value of the Purpose element

getListFromVdexSource

public java.lang.String[] getListFromVdexSource(java.lang.String vocabSource,
                                                java.lang.String elementName)
Get the vocabulary list items from a Vdex file.

Parameters:
vocabSource - the Vdex vocabulary name or identifier
elementName - the Vdex vocabulary element who's value becomes an item of this vocabulary list
Returns:
a String array of items of the vocabulary list

addReloadVocabularyListener

public void addReloadVocabularyListener(ReloadVocabularyListener listener)
Add a ReloadVocabularyListener

Parameters:
listener - The ReloadVocabularyListener

removeReloadVocabularyListener

public void removeReloadVocabularyListener(ReloadVocabularyListener listener)
Remove a ReloadVocabularyListener

Parameters:
listener - The ReloadVocabularyListener

fireElementChanged

public void fireElementChanged(ReloadVocabularyListenerEvent event)
Tell our listeners that we have changed the vocabulary list

Parameters:
event - the ReloadVocabularyListenerEvent

VdexReload 1.1.3 API