VdexReload 1.1.3 API

uk.ac.reload.moonunit.schema
Class ReloadVocabulary

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

public class ReloadVocabulary
extends java.lang.Object

The Reload Vocabulary - Defines a Vocabulary mapping between Elements/Attributes and a Vocabulary List. The actual Vocabulary is an XML File that defines the mappings.


Field Summary
protected  org.jdom.Document _docVocab
          The JDOM Document that is created from the XML File
protected  java.io.File _fileVocab
          The XML Vocabulary File.
protected  java.util.Vector _lists
          The Vocabulary lists
 
Method Summary
static ReloadVocabulary getReloadVocabulary(java.io.File fileVocab)
          Factory method for getting a static re-usable ReloadVocabulary
protected  java.lang.String getRootAttributeValue(java.lang.String attName)
          Get the value of a root attribute
 org.jdom.Document getVocabularyDocument()
          Get the Vocabulary JDOM Document
 ReloadVocabularyList getVocabularyList(DomPath nodePath)
          Get a Vocabulary List for a Given Element or Attribute.
 ReloadVocabularyList getVocabularyList(ReloadSchemaNode schemaNode)
          Get a Vocabulary List for a Given Element or Attribute.
 java.lang.String getVocabularyName()
          Get the name of the vocabulary.
 void setDefaultLanguage(java.lang.String lang)
          Set the default language of format "en", "fr" etc
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_docVocab

protected org.jdom.Document _docVocab
The JDOM Document that is created from the XML File


_fileVocab

protected java.io.File _fileVocab
The XML Vocabulary File.


_lists

protected java.util.Vector _lists
The Vocabulary lists

Method Detail

getReloadVocabulary

public static ReloadVocabulary getReloadVocabulary(java.io.File fileVocab)
                                            throws ReloadSchemaException
Factory method for getting a static re-usable ReloadVocabulary

Parameters:
fileVocab - The file of the Vocabulary file to get
Returns:
The ReloadVocabulary or null if not found
Throws:
ReloadSchemaException

getVocabularyDocument

public org.jdom.Document getVocabularyDocument()
Get the Vocabulary JDOM Document

Returns:
The Vocabulary JDOM Document

getVocabularyName

public java.lang.String getVocabularyName()
Get the name of the vocabulary. e.g. "IMS-LRM"

Returns:
The name of the vocabulary.

getVocabularyList

public ReloadVocabularyList getVocabularyList(ReloadSchemaNode schemaNode)
Get a Vocabulary List for a Given Element or Attribute.

Parameters:
schemaNode - The Element or Attribute
Returns:
The Vocabulary List or null if there isn't one

getVocabularyList

public ReloadVocabularyList getVocabularyList(DomPath nodePath)
Get a Vocabulary List for a Given Element or Attribute.

Parameters:
nodePath - the domPath of the element
Returns:
the Vocabulary List or null if there isn't one

setDefaultLanguage

public void setDefaultLanguage(java.lang.String lang)
Set the default language of format "en", "fr" etc

Parameters:
lang - the default language

getRootAttributeValue

protected java.lang.String getRootAttributeValue(java.lang.String attName)
Get the value of a root attribute

Returns:
the value of a root attribute or null

VdexReload 1.1.3 API