@Controller public class VocabulariesController extends VocabularyDAO
serviceLocator| Constructor and Description |
|---|
VocabulariesController() |
| Modifier and Type | Method and Description |
|---|---|
void |
commitTerms(List<Term> terms,
String vocabularyId) |
void |
commitVocabularyInfo(Vocabulary voc,
String vocabularyId) |
String |
createVocabulary(Vocabulary voc) |
void |
dropVocabulary(String vocabularyId) |
List<Term> |
getTerms(String vocabularyId)
Returns all terms and their synonyms belonging to a vocabulary.
|
List<Vocabulary> |
getVocabularies()
Returns all vocabularies serialized in json.
|
@RequestMapping(value="/ui/vocabularies.json") @ResponseBody public List<Vocabulary> getVocabularies() throws VocabularyException
getVocabularies in class VocabularyDAOVocabularyException@RequestMapping(value="/ui/terms.json") @ResponseBody public List<Term> getTerms(@RequestParam(value="vocabularyId",required=true) String vocabularyId) throws VocabularyException
getTerms in class VocabularyDAOVocabularyException@RequestMapping(value="/ui/commitVocabulary",
method=POST)
@ResponseBody
public void commitTerms(@RequestBody(required=true)
List<Term> terms,
@RequestParam(value="vocabularyId",required=true)
String vocabularyId)
throws VocabularyException
commitTerms in class VocabularyDAOVocabularyException@RequestMapping(value="/ui/commitVocabularyInfo",
method=POST)
@ResponseBody
public void commitVocabularyInfo(@RequestBody(required=true)
Vocabulary voc,
@RequestParam(value="vocabularyId",required=true)
String vocabularyId)
throws VocabularyException
commitVocabularyInfo in class VocabularyDAOVocabularyException@RequestMapping(value="/ui/createVocabulary",
method=POST)
@ResponseBody
public String createVocabulary(@RequestBody(required=true)
Vocabulary voc)
throws VocabularyException
createVocabulary in class VocabularyDAOVocabularyException@RequestMapping(value="/ui/dropVocabulary",
method=GET)
@ResponseBody
public void dropVocabulary(@RequestParam(value="vocabularyId",required=true)
String vocabularyId)
throws VocabularyException
dropVocabulary in class VocabularyDAOVocabularyExceptionCopyright © 2019. All rights reserved.