Fixed check on controlled vocabulary
This commit is contained in:
parent
878b5cfae9
commit
243cae757f
|
@ -23,6 +23,7 @@ import org.gcube.datacatalogue.metadatadiscovery.bean.jaxb.MetadataField;
|
|||
import org.gcube.datacatalogue.metadatadiscovery.bean.jaxb.MetadataFormat;
|
||||
import org.gcube.datacatalogue.metadatadiscovery.bean.jaxb.MetadataGrouping;
|
||||
import org.gcube.datacatalogue.metadatadiscovery.bean.jaxb.MetadataTagging;
|
||||
import org.gcube.datacatalogue.metadatadiscovery.bean.jaxb.MetadataVocabulary;
|
||||
import org.gcube.datacatalogue.metadatadiscovery.bean.jaxb.NamespaceCategory;
|
||||
import org.gcube.gcat.persistence.ckan.CKANGroup;
|
||||
import org.gcube.gcat.persistence.ckan.CKANPackage;
|
||||
|
@ -465,7 +466,14 @@ public class Validator {
|
|||
DataType dataType = metadataField.getDataType();
|
||||
String regex = metadataField.getValidator() != null ? metadataField.getValidator().getRegularExpression()
|
||||
: null;
|
||||
boolean hasControlledVocabulary = metadataField.getVocabulary() != null;
|
||||
boolean hasControlledVocabulary = false;
|
||||
MetadataVocabulary metadataVocabulary = metadataField.getVocabulary();
|
||||
if(metadataVocabulary!=null) {
|
||||
List<String> vocabularyFields = metadataVocabulary.getVocabularyFields();
|
||||
if(vocabularyFields!=null && vocabularyFields.size()>0) {
|
||||
hasControlledVocabulary = true;
|
||||
}
|
||||
}
|
||||
String value = fieldToValidate.getValue();
|
||||
String key = fieldToValidate.getKey();
|
||||
String defaultValue = metadataField.getDefaultValue();
|
||||
|
|
Loading…
Reference in New Issue