Skip to content
Snippets Groups Projects
Commit 97d4c3c7 authored by felmer's avatar felmer
Browse files

SSDM-3529: bugs fixed.

SVN: 36463
parent 88113990
No related branches found
No related tags found
No related merge requests found
...@@ -19,6 +19,9 @@ define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) { ...@@ -19,6 +19,9 @@ define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) {
this.propertyType = propertyType; this.propertyType = propertyType;
}; };
prototype.getVocabularyFetchOptions = function() { prototype.getVocabularyFetchOptions = function() {
if (this.propertyType == null) {
return null;
}
return this.propertyType.getVocabularyFetchOptions(); return this.propertyType.getVocabularyFetchOptions();
} }
prototype.getVocabulary = function() { prototype.getVocabulary = function() {
......
...@@ -48,7 +48,7 @@ define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) { ...@@ -48,7 +48,7 @@ define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) {
this.vocabularyFetchOptions = vocabularyFetchOptions; this.vocabularyFetchOptions = vocabularyFetchOptions;
}; };
prototype.getVocabulary = function() { prototype.getVocabulary = function() {
if (this.getVocabularyFetchOptions() && this.getVocabularyFetchOptions().hasVocabulary()) { if (this.getVocabularyFetchOptions()) {
return this.vocabulary; return this.vocabulary;
} else { } else {
throw new exceptions.NotFetchedException("Vocabulary has not been fetched."); throw new exceptions.NotFetchedException("Vocabulary has not been fetched.");
...@@ -58,7 +58,7 @@ define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) { ...@@ -58,7 +58,7 @@ define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) {
this.vocabulary = vocabulary; this.vocabulary = vocabulary;
}; };
}, { }, {
vocabularyFetchOptions : "VocabularyTermFetchOptions", vocabularyFetchOptions : "VocabularyFetchOptions",
vocabulary : "Vocabulary", vocabulary : "Vocabulary",
dataTypeCode : "DataTypeCode" dataTypeCode : "DataTypeCode"
}); });
......
...@@ -18,6 +18,7 @@ package ch.ethz.sis.openbis.generic.asapi.v3.dto.property; ...@@ -18,6 +18,7 @@ package ch.ethz.sis.openbis.generic.asapi.v3.dto.property;
import java.io.Serializable; import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.vocabulary.Vocabulary; import ch.ethz.sis.openbis.generic.asapi.v3.dto.vocabulary.Vocabulary;
...@@ -59,11 +60,13 @@ public class PropertyAssignment implements Serializable ...@@ -59,11 +60,13 @@ public class PropertyAssignment implements Serializable
this.propertyType = propertyType; this.propertyType = propertyType;
} }
@JsonIgnore
public VocabularyFetchOptions getVocabularyFetchOptions() public VocabularyFetchOptions getVocabularyFetchOptions()
{ {
return propertyType.getVocabularyFetchOptions(); return propertyType.getVocabularyFetchOptions();
} }
@JsonIgnore
public Vocabulary getVocabulary() public Vocabulary getVocabulary()
{ {
if (getVocabularyFetchOptions() != null) if (getVocabularyFetchOptions() != null)
......
...@@ -18,6 +18,7 @@ package ch.ethz.sis.openbis.generic.asapi.v3.dto.property; ...@@ -18,6 +18,7 @@ package ch.ethz.sis.openbis.generic.asapi.v3.dto.property;
import java.io.Serializable; import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import ch.ethz.sis.openbis.generic.asapi.v3.dto.common.interfaces.ICodeHolder; import ch.ethz.sis.openbis.generic.asapi.v3.dto.common.interfaces.ICodeHolder;
...@@ -116,6 +117,7 @@ public class PropertyType implements ICodeHolder, Serializable ...@@ -116,6 +117,7 @@ public class PropertyType implements ICodeHolder, Serializable
this.vocabularyFetchOptions = fetchOptions; this.vocabularyFetchOptions = fetchOptions;
} }
@JsonIgnore
public Vocabulary getVocabulary() public Vocabulary getVocabulary()
{ {
if (getVocabularyFetchOptions() != null) if (getVocabularyFetchOptions() != null)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment