@Override public org.phenotips.vocabularies.rest.model.Vocabulary createVocabularyRepresentation(Vocabulary vocabulary) { org.phenotips.vocabularies.rest.model.Vocabulary result = new org.phenotips.vocabularies.rest.model.Vocabulary(); result .withIdentifier(vocabulary.getIdentifier()) .withName(vocabulary.getName()) .withAliases(vocabulary.getAliases()) .withSize(vocabulary.size()) .withVersion(vocabulary.getVersion()); try { result.withDefaultSourceLocation(vocabulary.getDefaultSourceLocation()); } catch (UnsupportedOperationException e) { // Don't do anything and leave source empty } return result; }
@Override public org.phenotips.vocabularies.rest.model.Vocabulary createVocabularyRepresentation(Vocabulary vocabulary) { org.phenotips.vocabularies.rest.model.Vocabulary result = new org.phenotips.vocabularies.rest.model.Vocabulary(); result .withIdentifier(vocabulary.getIdentifier()) .withName(vocabulary.getName()) .withAliases(vocabulary.getAliases()) .withSize(vocabulary.size()) .withVersion(vocabulary.getVersion()); try { result.withDefaultSourceLocation(vocabulary.getDefaultSourceLocation()); } catch (UnsupportedOperationException e) { // Don't do anything and leave source empty } return result; }