return featureVocabulary;\r
} catch (UnknownCdmTypeException e) {\r
logger.error("Feature vocabulary not available. New vocabulary created");\r
- return new TermVocabulary<Feature>() ;\r
+ return TermVocabulary.NewInstance("User Defined Feature Vocabulary", "User Defined Feature Vocabulary", null, null); \r
}\r
}\r
\r
protected TermVocabulary getVocabulary(UUID uuid, String text, String label, String abbrev) {\r
TermVocabulary voc = getVocabularyService().find(uuid);\r
if (voc == null){\r
- voc = new TermVocabulary();\r
+ voc = TermVocabulary.NewInstance(text, label, abbrev, null);\r
voc.setUuid(uuid);\r
- Representation representation = Representation.NewInstance(text, label, abbrev, Language.DEFAULT());\r
- voc.addRepresentation(representation);\r
getVocabularyService().save(voc);\r
}\r
return voc;\r
\r
// <StateDefinition id="s1">\r
List<Element> elStateDefinitions = elStates.getChildren("StateDefinition",sddNamespace);\r
- TermVocabulary<State> termVocabularyState = new TermVocabulary<State>();\r
+ TermVocabulary<State> termVocabularyState = TermVocabulary.NewInstance(null, null, null, null);\r
\r
vocabularies.add(termVocabularyState);\r
\r
Element elModifiers = elDescriptiveConcept.getChild("Modifiers", sddNamespace);\r
if (elModifiers !=null){\r
List<Element> listModifiers = elModifiers.getChildren("Modifier", sddNamespace);\r
- TermVocabulary<Modifier> termVocabularyState = new TermVocabulary<Modifier>();\r
+ TermVocabulary<Modifier> termVocabularyState = TermVocabulary.NewInstance(null, null, null, null);\r
for (Element elModifier : listModifiers) {\r
Modifier modif = Modifier.NewInstance();\r
String idmod = elModifier.getAttributeValue("id");\r
\r
// <StateDefinition id="s1">\r
List<Element> elStateDefinitions = elStates.getChildren("StateDefinition",sddNamespace);\r
- TermVocabulary<State> termVocabularyState = new TermVocabulary<State>();\r
+ TermVocabulary<State> termVocabularyState = TermVocabulary.NewInstance(null, null, null, null);\r
\r
vocabularies.add(termVocabularyState);\r
\r
Element elModifiers = elDescriptiveConcept.getChild("Modifiers", sddNamespace);\r
if (elModifiers !=null){\r
List<Element> listModifiers = elModifiers.getChildren("Modifier", sddNamespace);\r
- TermVocabulary<Modifier> termVocabularyState = new TermVocabulary<Modifier>();\r
+ TermVocabulary<Modifier> termVocabularyState = TermVocabulary.NewInstance(null, null, null, null);\r
for (Element elModifier : listModifiers) {\r
Modifier modif = Modifier.NewInstance();\r
String idmod = elModifier.getAttributeValue("id");\r
protected Set<T> terms = getNewTermSet();
// ********************************* FACTORY METHODS *****************************************/
-
+
public static TermVocabulary NewInstance(String description, String label, String abbrev, String termSourceUri){
return new TermVocabulary(description, label, abbrev, termSourceUri);
}