diff --git a/cadc-datalink/build.gradle b/cadc-datalink/build.gradle index 1086e075..016c4156 100644 --- a/cadc-datalink/build.gradle +++ b/cadc-datalink/build.gradle @@ -14,7 +14,7 @@ sourceCompatibility = '1.8' group = 'org.opencadc' -version = '1.1.1' +version = '1.1.2' description = 'OpenCADC DataLink library' def git_url = 'https://github.com/opencadc/dal' diff --git a/cadc-datalink/src/main/java/org/opencadc/datalink/DataLink.java b/cadc-datalink/src/main/java/org/opencadc/datalink/DataLink.java index ba66b05c..50365096 100644 --- a/cadc-datalink/src/main/java/org/opencadc/datalink/DataLink.java +++ b/cadc-datalink/src/main/java/org/opencadc/datalink/DataLink.java @@ -83,31 +83,31 @@ public class DataLink { * Terms from the http://www.ivoa.net/rdf/datalink/core vocabulary */ public enum Term { // TODO: re-use the VocabularyTerm code once extracted from caom2 - THIS("#this"), - PROGENITOR("#progenitor"), - DERIVATION("#derivation"), - DOCUMENTATION("#documentation"), AUXILIARY("#auxiliary"), - WEIGHT("#weight"), - ERROR("#error"), - NOISE("#noise"), - - CALIBRATION("#calibration"), BIAS("#bias"), + CALIBRATION("#calibration"), + CODERIVED("#coderived"), + COUNTERPART("#counterpart"), + CUTOUT("#cutout"), DARK("#dark"), + DERIVATION("#derivation"), + DETEACHED_HEADER("#detached-header"), + DOCUMENTATION("#documentation"), + ERROR("#error"), FLAT("#flat"), - + NOISE("#noise"), + PACKAGE("#package"), PREVIEW("#preview"), PREVIEW_IMAGE("#preview-image"), PREVIEW_PLOT("#preview-plot"), + PROC("#proc"), + PROGENITOR("#progenitor"), + THIS("#this"), THUMBNAIL("#thumbnail"), + WEIGHT("#weight"); - PROC("#proc"), - CUTOUT("#cutout"), - PACKAGE("#package"); - private final String value; private Term(String value) { @@ -117,6 +117,15 @@ private Term(String value) { public String getValue() { return value; } + + public static DataLink.Term getTerm(String s) { + for (Term t : values()) { + if (t.value.equals(s)) { + return t; + } + } + return null; + } } public enum LinkAuthTerm {