public class ControlledVocabulary extends Object
| Constructor and Description |
|---|
ControlledVocabulary(String id,
String label,
String value,
List<ControlledVocabulary> childNodes) |
| Modifier and Type | Method and Description |
|---|---|
List<ControlledVocabulary> |
getChildNodes() |
String |
getId() |
String |
getLabel() |
String |
getValue() |
static ControlledVocabulary |
loadVocabulary(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(List<ControlledVocabulary> childNodes) |
void |
setId(String id) |
void |
setLabel(String label) |
void |
setValue(String value) |
public ControlledVocabulary(String id, String label, String value, List<ControlledVocabulary> childNodes)
public static ControlledVocabulary loadVocabulary(String fileName) throws IOException, SAXException, ParserConfigurationException, TransformerException
fileName - the name of the vocabulary file.IOException - Should something go wrong with reading the fileSAXException - Error during xml parsingParserConfigurationException - Error during xml parsingTransformerException - Error during xml parsing
TODO: add some caching !public String getId()
public void setId(String id)
public String getLabel()
public void setLabel(String label)
public List<ControlledVocabulary> getChildNodes()
public void setChildNodes(List<ControlledVocabulary> childNodes)
public String getValue()
public void setValue(String value)
Copyright © 2016 DuraSpace. All Rights Reserved.