public class ControlledVocabulary
extends java.lang.Object
| Constructor and Description |
|---|
ControlledVocabulary(java.lang.String id,
java.lang.String label,
java.lang.String value,
java.util.List<ControlledVocabulary> childNodes) |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<ControlledVocabulary> |
getChildNodes() |
java.lang.String |
getId() |
java.lang.String |
getLabel() |
java.lang.String |
getValue() |
static ControlledVocabulary |
loadVocabulary(java.lang.String fileName)
Load the vocabulary with the given filename, if no vocabulary is found null is returned
The vocabulary file will need to located in the [dspace.dir]/config/controlled-vocabulary directory.
|
void |
setChildNodes(java.util.List<ControlledVocabulary> childNodes) |
void |
setId(java.lang.String id) |
void |
setLabel(java.lang.String label) |
void |
setValue(java.lang.String value) |
public ControlledVocabulary(java.lang.String id,
java.lang.String label,
java.lang.String value,
java.util.List<ControlledVocabulary> childNodes)
public static ControlledVocabulary loadVocabulary(java.lang.String fileName) throws java.io.IOException, org.xml.sax.SAXException, javax.xml.parsers.ParserConfigurationException, javax.xml.transform.TransformerException
fileName - the name of the vocabulary file.java.io.IOException - Should something go wrong with reading the fileorg.xml.sax.SAXException - Error during xml parsingjavax.xml.parsers.ParserConfigurationException - Error during xml parsingjavax.xml.transform.TransformerException - Error during xml parsing
TODO: add some caching !public java.lang.String getId()
public void setId(java.lang.String id)
public java.lang.String getLabel()
public void setLabel(java.lang.String label)
public java.util.List<ControlledVocabulary> getChildNodes()
public void setChildNodes(java.util.List<ControlledVocabulary> childNodes)
public java.lang.String getValue()
public void setValue(java.lang.String value)
Copyright © 2013 DuraSpace. All Rights Reserved.