diff --git a/README.md b/README.md
index 80175c3..5ef0f06 100644
--- a/README.md
+++ b/README.md
@@ -54,8 +54,9 @@ gradle -x test build
** -r --constructors-required-only : generate constructor for required field only
** -R remove old output
```aidl
- jsonschema2pojo -s ./UMM-G1.6.3.json --target java-gen -p gov.nasa.cumulus.metadata.umm.model -a GSON -r -fdt true -R
- jsonschema2pojo -s ./UMM-G1.6.3.json --target java-gen -p gov.nasa.cumulus.metadata.umm.model -a GSON -fdt
+
+ jsonschema2pojo -s ./ummg165.json --target java-gen -p gov.nasa.cumulus.metadata.umm.generated -a GSON -fdt -r -R
+ jsonschema2pojo -s ./ummg165.json --target java-gen -p gov.nasa.cumulus.metadata.umm.generated -a GSON -fdt
jsonshcema2pojo maven plugin is also configured within the pom.xml file
mvn compile // call plugin goal to generate pojo classes
diff --git a/pom.xml b/pom.xml
index 05c994c..0903718 100755
--- a/pom.xml
+++ b/pom.xml
@@ -44,13 +44,13 @@
com.amazonaws
aws-java-sdk-s3
- 1.12.440
+ 1.12.515
com.amazonaws
aws-java-sdk-secretsmanager
- 1.12.440
+ 1.12.515
org.apache.httpcomponents
diff --git a/src/main/java/gov/nasa/cumulus/metadata/aggregator/CMRLambdaRestClient.java b/src/main/java/gov/nasa/cumulus/metadata/aggregator/CMRLambdaRestClient.java
index 87f96c8..a059372 100644
--- a/src/main/java/gov/nasa/cumulus/metadata/aggregator/CMRLambdaRestClient.java
+++ b/src/main/java/gov/nasa/cumulus/metadata/aggregator/CMRLambdaRestClient.java
@@ -337,6 +337,8 @@ public HttpResponse validateUMMG(String provider, String granuleId, String strU
*/
public boolean isUMMGSpatialValid(String provider, String granuleId, String strUMMG)
throws URISyntaxException, IOException, ParseException {
+ AdapterLogger.LogInfo(this.className + " UMMG validation provider: "+ provider + " granuleId: " + granuleId +
+ " ummg: " + strUMMG);
HttpResponse httpResponse = validateUMMG(provider, granuleId, strUMMG);
int statusCode = httpResponse.getStatusLine().getStatusCode();
InputStream inputStream = httpResponse.getEntity().getContent();
diff --git a/src/main/java/gov/nasa/cumulus/metadata/aggregator/Constants.java b/src/main/java/gov/nasa/cumulus/metadata/aggregator/Constants.java
index a23ac6e..7b74d13 100644
--- a/src/main/java/gov/nasa/cumulus/metadata/aggregator/Constants.java
+++ b/src/main/java/gov/nasa/cumulus/metadata/aggregator/Constants.java
@@ -6,5 +6,5 @@ public static class Metadata{
public static final String START_ORBIT = "startorbit";
public static final String END_ORBIT = "endorbit";
}
- public static final String UMMG_VERSION = "1.6.3";
+ public static final String UMMG_VERSION = "1.6.5";
}
diff --git a/src/main/java/gov/nasa/cumulus/metadata/aggregator/IsoMendsXPath.java b/src/main/java/gov/nasa/cumulus/metadata/aggregator/IsoMendsXPath.java
index 2149a33..69a7508 100644
--- a/src/main/java/gov/nasa/cumulus/metadata/aggregator/IsoMendsXPath.java
+++ b/src/main/java/gov/nasa/cumulus/metadata/aggregator/IsoMendsXPath.java
@@ -34,6 +34,8 @@ public final class IsoMendsXPath extends IsoXPath {
// AscendingCrossing, StartLatitude, StartDirection, EndLatitude, EndDirection
public static final String ORBIT = "/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicDescription[@id=\"Orbit\"]/gmd:geographicIdentifier/gmd:MD_Identifier/gmd:code/gco:CharacterString";
+ /** list of coordinates representing footprint */
+ public static final String LINE = "/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_BoundingPolygon/gmd:polygon/gml:Polygon/gml:exterior/gml:LinearRing/gml:posList ";
public static final String GRANULE_INPUT = "/gmi:MI_Metadata/gmd:dataQualityInfo/gmd:DQ_DataQuality/gmd:lineage/gmd:LI_Lineage/gmd:source/gmi:LE_Source[gmd:description/gco:CharacterString[text()=\"GranuleInput\"]]/gmd:sourceCitation/gmd:CI_Citation/gmd:title/gmx:FileName";
public static final String CYCLE_PASS_TILE_SCENE = "/gmi:MI_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:extent/gmd:EX_Extent/gmd:geographicElement/gmd:EX_GeographicDescription[@id=\"SWOTTrack\"]/gmd:geographicIdentifier/gmd:MD_Identifier/gmd:code/gco:CharacterString";
diff --git a/src/main/java/gov/nasa/cumulus/metadata/aggregator/MetadataAggregatorLambda.java b/src/main/java/gov/nasa/cumulus/metadata/aggregator/MetadataAggregatorLambda.java
index 52263b2..b04d77a 100644
--- a/src/main/java/gov/nasa/cumulus/metadata/aggregator/MetadataAggregatorLambda.java
+++ b/src/main/java/gov/nasa/cumulus/metadata/aggregator/MetadataAggregatorLambda.java
@@ -150,6 +150,8 @@ public String PerformFunction(String input, Context context) throws Exception {
boolean isIsoFile = (iso != null);
mtfe = new MetadataFilesToEcho(isIsoFile);
+ //set the name/granuleId
+ mtfe.getGranule().setName(granuleId);
mtfe.setDatasetValues(collectionName, collectionVersion, rangeIs360, boundingBox, additionalAttributes);
if (granules != null && granules.size() > 0) {
mtfe.setGranuleFileSizeAndChecksum(granules);
@@ -182,10 +184,6 @@ public String PerformFunction(String input, Context context) throws Exception {
}
}
- //set the name
- mtfe.getGranule().setName(granuleId);
-
-
//write UMM-G to file
try {
mtfe.writeJson("/tmp/" + granuleId + ".cmr.json");
diff --git a/src/main/java/gov/nasa/cumulus/metadata/aggregator/MetadataFilesToEcho.java b/src/main/java/gov/nasa/cumulus/metadata/aggregator/MetadataFilesToEcho.java
index 00bd6e0..342df2c 100644
--- a/src/main/java/gov/nasa/cumulus/metadata/aggregator/MetadataFilesToEcho.java
+++ b/src/main/java/gov/nasa/cumulus/metadata/aggregator/MetadataFilesToEcho.java
@@ -10,6 +10,7 @@
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
import javax.xml.bind.DatatypeConverter;
import javax.xml.parsers.DocumentBuilder;
@@ -476,8 +477,25 @@ public IsoGranule readIsoMendsMetadataFile(String s3Location, Document doc, XPat
if (qaPercentOutOfBoundsData != "" && BoundingTools.isParseable(qaPercentOutOfBoundsData)) {
((IsoGranule) granule).setQAPercentOutOfBoundsData(Double.parseDouble(qaPercentOutOfBoundsData));
}
-
- ((IsoGranule) granule).setOrbit(xpath.evaluate(IsoMendsXPath.ORBIT, doc));
+ /**
+ * first of all check if Orbit existed. If not, then
+ * extract the footprint/polygon from nc.iso.xml file and store the posList into the "line" Character
+ */
+ String orbitStr = xpath.evaluate(IsoMendsXPath.ORBIT, doc);
+ if(!StringUtils.isEmpty(orbitStr)) {
+ ((IsoGranule) granule).setOrbit(xpath.evaluate(IsoMendsXPath.ORBIT, doc));
+ } else {
+ try {
+ String line = xpath.evaluate(IsoMendsXPath.LINE, doc);
+ if (line != null && !line.isEmpty()) {
+ granule.getGranuleCharacterSet().add(createGranuleCharacter(line,"line"));
+ }
+ } catch (XPathExpressionException e) {
+ // Ignore if unable to parse for footprint since it isn't required for ingest
+ AdapterLogger.LogWarning(this.className + " Not able to extract MENDS footprint: " + e);
+ }
+ }
+ //extract and store Track Pass string
((IsoGranule) granule).setSwotTrack(xpath.evaluate(IsoMendsXPath.SWOT_TRACK, doc));
Source source = new Source();
@@ -535,8 +553,10 @@ public IsoGranule readIsoMendsMetadataFile(String s3Location, Document doc, XPat
String mgrsId = xpath.evaluate(IsoMendsXPath.MGRS_ID, doc);
if (mgrsId != null && !mgrsId.equals("")) {
// If MGRS_ID field is not null, set as additional attribute
- AdditionalAttributeType mgrsAttr = new AdditionalAttributeType("MGRS_TILE_ID", Collections.singletonList(mgrsId));
-
+ AdditionalAttributeType mgrsAttr = new AdditionalAttributeType();
+ mgrsAttr.setName("MGRS_TILE_ID");
+ mgrsAttr.setValues(Collections.singletonList(mgrsId));
+
List additionalAttributeTypes = ((IsoGranule) granule).getAdditionalAttributeTypes();
if (additionalAttributeTypes == null) {
additionalAttributeTypes = Collections.singletonList(mgrsAttr);
@@ -557,6 +577,44 @@ public IsoGranule readIsoMendsMetadataFile(String s3Location, Document doc, XPat
return ((IsoGranule) granule);
}
+ public boolean isOrbitExisting(String orbitStr) {
+ if(StringUtils.isEmpty(StringUtils.trim(orbitStr))) {
+ return false;
+ } else{
+ try {
+ Pattern p = Pattern.compile("AscendingCrossing:\\s?(.*)\\s?StartLatitude:\\s?(.*)\\s?StartDirection:\\s?(.*)\\s?EndLatitude:\\s?(.*)\\s?EndDirection:\\s?(.*)");
+ Matcher m = p.matcher(orbitStr);
+ boolean foundOrbitalData = false;
+ foundOrbitalData = m.find();
+ String ascendingCrossingStr = StringUtils.trim(m.group(1));
+ String startLatitudeStr = StringUtils.trim(m.group(2));
+ String startDirectionStr = StringUtils.trim(m.group(3));
+ String endLatitudeStr = StringUtils.trim(m.group(4));
+ String endDirectionStr = StringUtils.trim(m.group(5));
+
+ /** to verify the Orbit string using as-tight-as-possible logic to make sure the orbitStr is parsable
+ * and not anyone of the item is "None"
+ */
+ if (foundOrbitalData && BoundingTools.allParsable(ascendingCrossingStr, startLatitudeStr, endLatitudeStr) && (
+ !StringUtils.equalsIgnoreCase(ascendingCrossingStr, "None") &&
+ !StringUtils.equalsIgnoreCase(startLatitudeStr, "None") &&
+ !StringUtils.equalsIgnoreCase(startDirectionStr, "None") &&
+ !StringUtils.equalsIgnoreCase(endLatitudeStr, "None") &&
+ !StringUtils.equalsIgnoreCase(endDirectionStr, "None")
+ )) {
+ // only returning Orbit is found while the entire Orbit String check to be valid
+ return true;
+ } else {
+ return false;
+ }
+ } catch( java.lang.IllegalStateException | PatternSyntaxException ex) {
+ AdapterLogger.LogWarning(this.className + " error while checking if there is Orbit string: " + ex);
+ }
+ }
+ // again, only return true when a very tight pattern is valid
+ return false;
+ }
+
public List appendAdditionalAttributes(JSONObject metaAdditionalAttributes, NodeList additionalAttributesBlock){
/*
Scan through meta.additionalAttributes
@@ -668,13 +726,15 @@ public IsoGranule createIsoCyclePassTile(String cyclePassTileStr) {
AdapterLogger.LogError(this.className + " Creating TrackType with exception: " + UMMUtils.getStackTraceAsString(e));
throw e;
}
+
UmmgPojoFactory ummgPojoFactory = UmmgPojoFactory.getInstance();
additionalAttributeTypes=
ummgPojoFactory.trackTypeToAdditionalAttributeTypes(trackType);
}
// It is possible after all the above processing, cycle is present but passes is not (no pass in passes array)
// That is, we shall NOT create trackType at all. Otherwise, CMR will throw validation error
- if (trackType.getCycle()!=null && trackType.getPasses()!=null && trackType.getPasses().size() >0) {
+ // from UMMG Schema 1.6.5, TrackType contains Cycle and Passes and ONLY Cycle is required
+ if (trackType.getCycle()!=null) {
((IsoGranule) granule).setTrackType(trackType);
((IsoGranule) granule).setAdditionalAttributeTypes(additionalAttributeTypes);
}
@@ -712,16 +772,18 @@ public TrackType createTrackType(String cyclePassTileStr, Pattern p_cycle) {
StringUtils.replace(passTilesStr,"[",""),"]","");
passTilesStr = passTilesStr.replaceAll("TILES\\s*:\\s*?", "");
String[] passTiles = StringUtils.split(passTilesStr, ",");
- String passStr = StringUtils.trim(passTiles[0]);
- trackPassTileType.setPass(NumberUtils.createInteger(UMMUtils.removeStrLeadingZeros(passStr)));
- try {
- List tiles = getTiles(StringUtils.trim(passTiles[1]));
- trackPassTileType.setTiles(tiles);
- } catch (Exception e) {
- AdapterLogger.LogWarning(this.className + " Continue processing after tile processing failed with " +
- "exception: " + UMMUtils.getStackTraceAsString(e));
+ if(!StringUtils.isEmpty(passTilesStr) && passTiles.length >0) {
+ String passStr = StringUtils.trim(passTiles[0]);
+ trackPassTileType.setPass(NumberUtils.createInteger(UMMUtils.removeStrLeadingZeros(passStr)));
+ try {
+ List tiles = getTiles(StringUtils.trim(passTiles[1]));
+ trackPassTileType.setTiles(tiles);
+ } catch (Exception e) {
+ AdapterLogger.LogWarning(this.className + " Continue processing after tile processing failed with " +
+ "exception: " + UMMUtils.getStackTraceAsString(e));
+ }
+ trackPassTileTypes.add(trackPassTileType);
}
- trackPassTileTypes.add(trackPassTileType);
}
trackType.setPasses(trackPassTileTypes);
return trackType;
@@ -988,6 +1050,7 @@ public void readSentinelManifest(String file) throws ParserConfigurationExceptio
}
} catch (XPathExpressionException e) {
// Ignore if unable to parse for footprint since it isn't required for ingest
+ AdapterLogger.LogWarning(this.className + " Not able to extract footprint from SentinelManifest: " + e);
}
String cycle = StringUtils.trim(xpath.evaluate(ManifestXPath.CYCLE, doc));
diff --git a/src/main/java/gov/nasa/cumulus/metadata/aggregator/UMMGranuleFile.java b/src/main/java/gov/nasa/cumulus/metadata/aggregator/UMMGranuleFile.java
index 940ca03..6ab863a 100644
--- a/src/main/java/gov/nasa/cumulus/metadata/aggregator/UMMGranuleFile.java
+++ b/src/main/java/gov/nasa/cumulus/metadata/aggregator/UMMGranuleFile.java
@@ -200,6 +200,7 @@ public JSONObject defineGranule()
* Only when having gone through S6A Line to Polygon processing, then call UMMGPostProcessing.
*/
if(this.isLineFormattedPolygon) {
+ AdapterLogger.LogInfo(this.className + " Start post processing of UMMG by posting UMMG to CMR. If failed, put GBBox into UMMG");
granuleJson = UMMGPostProcessing(granuleJson);
}
@@ -396,6 +397,10 @@ private JSONObject exportTemporal() {
JSONObject range = new JSONObject();
range.put("BeginningDateTime", TimeConversion.convertDate(granule.getStartTime()).toString());
range.put("EndingDateTime", TimeConversion.convertDate(granule.getStopTime()).toString());
+ //TODO hard coded value for testing. Remove them later:
+ range.put("BeginningDateTime", "2022-12-16T22:41:48.323Z");
+ range.put("EndingDateTime", "2022-12-17T19:30:21.553Z");
+
temporal.put("RangeDateTime", range);
return temporal;
}
@@ -429,18 +434,26 @@ private JSONObject exportSpatial() throws ParseException{
addPolygon(geometry, polygon);
}
// Export Orbit
- // Commented out for now since UMM v1.5 only allows for either Geometry or Orbit not both
- JSONObject orbit = new JSONObject();
- horizontalSpatialDomain.put("Orbit", orbit);
- Pattern p = Pattern.compile("AscendingCrossing:\\s?(.*)\\s?StartLatitude:\\s?(.*)\\s?StartDirection:\\s?(.*)\\s?EndLatitude:\\s?(.*)\\s?EndDirection:\\s?(.*)");
- Matcher m = p.matcher(((IsoGranule) granule).getOrbit());
- foundOrbitalData = m.find();
- if (foundOrbitalData && BoundingTools.allParsable(m.group(1), m.group(2), m.group(4))) {
- orbit.put("AscendingCrossing", UMMUtils.longitudeTypeNormalizer(Double.parseDouble(m.group(1))));
- orbit.put("StartLatitude", Double.parseDouble(m.group(2)));
- orbit.put("StartDirection", m.group(3).trim());
- orbit.put("EndLatitude", Double.parseDouble(m.group(4)));
- orbit.put("EndDirection", m.group(5).trim());
+ // UMM v1.5 only allows for either Geometry or Orbit not both
+ /**
+ * Export Orbit
+ * UMM v1.5 only allows for either Geometry or Orbit not both. Only process orbit if the orbitString stored
+ * (during MetatdataFilesToEcho.readIsoxxxx()) is not empty or null
+ */
+ String orbitStr = ((IsoGranule) granule).getOrbit();
+ if (!StringUtils.isEmpty(orbitStr)) {
+ JSONObject orbit = new JSONObject();
+ horizontalSpatialDomain.put("Orbit", orbit);
+ Pattern p = Pattern.compile("AscendingCrossing:\\s?(.*)\\s?StartLatitude:\\s?(.*)\\s?StartDirection:\\s?(.*)\\s?EndLatitude:\\s?(.*)\\s?EndDirection:\\s?(.*)");
+ Matcher m = p.matcher(orbitStr);
+ foundOrbitalData = m.find();
+ if (foundOrbitalData && BoundingTools.allParsable(m.group(1), m.group(2), m.group(4))) {
+ orbit.put("AscendingCrossing", UMMUtils.longitudeTypeNormalizer(Double.parseDouble(m.group(1))));
+ orbit.put("StartLatitude", Double.parseDouble(m.group(2)));
+ orbit.put("StartDirection", m.group(3).trim());
+ orbit.put("EndLatitude", Double.parseDouble(m.group(4)));
+ orbit.put("EndDirection", m.group(5).trim());
+ }
}
// Export track
@@ -586,10 +599,11 @@ private JSONObject exportSpatial() throws ParseException{
}
// Export footprint if it exists
-
Set granuleCharacters = granule.getGranuleCharacterSet();
for (GranuleCharacter granuleCharacter : granuleCharacters) {
if (granuleCharacter.getDatasetElement().getElementDD().getShortName().equals("line")) {
+ AdapterLogger.LogInfo(this.className + " Start processing line2Polygons : " + granuleCharacter.getValue() );
+ this.isLineFormattedPolygon = true;
geometry = line2Polygons(geometry,granuleCharacter.getValue());
break;
}
diff --git a/src/main/java/gov/nasa/cumulus/metadata/aggregator/processor/FootprintProcessor.java b/src/main/java/gov/nasa/cumulus/metadata/aggregator/processor/FootprintProcessor.java
index c584b01..b83776d 100755
--- a/src/main/java/gov/nasa/cumulus/metadata/aggregator/processor/FootprintProcessor.java
+++ b/src/main/java/gov/nasa/cumulus/metadata/aggregator/processor/FootprintProcessor.java
@@ -341,8 +341,8 @@ public ExclusiveZoneType getExclusiveZones(Geometry geometry) {
boundary.setPoints(points);
boundaries.add(boundary);
}
-
- ExclusiveZoneType exclusiveZoneType = new ExclusiveZoneType(boundaries);
+ ExclusiveZoneType exclusiveZoneType = new ExclusiveZoneType();
+ exclusiveZoneType.setBoundaries(boundaries);
return exclusiveZoneType;
}
diff --git a/src/main/java/gov/nasa/cumulus/metadata/umm/generated/AdditionalAttributeType.java b/src/main/java/gov/nasa/cumulus/metadata/umm/generated/AdditionalAttributeType.java
index 03331b2..7ea0b49 100644
--- a/src/main/java/gov/nasa/cumulus/metadata/umm/generated/AdditionalAttributeType.java
+++ b/src/main/java/gov/nasa/cumulus/metadata/umm/generated/AdditionalAttributeType.java
@@ -3,6 +3,7 @@
import java.util.ArrayList;
import java.util.List;
+import javax.annotation.Generated;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
@@ -11,6 +12,7 @@
* A reference to an additional attribute in the parent collection. The attribute reference may contain a granule specific value that will override the value in the parent collection for this granule. An attribute with the same name must exist in the parent collection.
*
*/
+@Generated("jsonschema2pojo")
public class AdditionalAttributeType {
/**
@@ -30,24 +32,6 @@ public class AdditionalAttributeType {
@Expose
private List values = new ArrayList();
- /**
- * No args constructor for use in serialization
- *
- */
- public AdditionalAttributeType() {
- }
-
- /**
- *
- * @param values
- * @param name
- */
- public AdditionalAttributeType(String name, List values) {
- super();
- this.name = name;
- this.values = values;
- }
-
/**
* The additional attribute's name.
* (Required)
diff --git a/src/main/java/gov/nasa/cumulus/metadata/umm/generated/BoundaryType.java b/src/main/java/gov/nasa/cumulus/metadata/umm/generated/BoundaryType.java
index acbe0f5..556453e 100644
--- a/src/main/java/gov/nasa/cumulus/metadata/umm/generated/BoundaryType.java
+++ b/src/main/java/gov/nasa/cumulus/metadata/umm/generated/BoundaryType.java
@@ -3,6 +3,7 @@
import java.util.ArrayList;
import java.util.List;
+import javax.annotation.Generated;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
@@ -11,6 +12,7 @@
* A boundary is set of points connected by straight lines representing a polygon on the earth. It takes a minimum of three points to make a boundary. Points must be specified in counter-clockwise order and closed (the first and last vertices are the same).
*
*/
+@Generated("jsonschema2pojo")
public class BoundaryType {
/**
@@ -22,22 +24,6 @@ public class BoundaryType {
@Expose
private List points = new ArrayList();
- /**
- * No args constructor for use in serialization
- *
- */
- public BoundaryType() {
- }
-
- /**
- *
- * @param points
- */
- public BoundaryType(List points) {
- super();
- this.points = points;
- }
-
/**
*
* (Required)
diff --git a/src/main/java/gov/nasa/cumulus/metadata/umm/generated/BoundingRectangleType.java b/src/main/java/gov/nasa/cumulus/metadata/umm/generated/BoundingRectangleType.java
index 5a11216..2de05df 100644
--- a/src/main/java/gov/nasa/cumulus/metadata/umm/generated/BoundingRectangleType.java
+++ b/src/main/java/gov/nasa/cumulus/metadata/umm/generated/BoundingRectangleType.java
@@ -1,6 +1,7 @@
package gov.nasa.cumulus.metadata.umm.generated;
+import javax.annotation.Generated;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
@@ -9,6 +10,7 @@
* This entity holds the horizontal spatial coverage of a bounding box.
*
*/
+@Generated("jsonschema2pojo")
public class BoundingRectangleType {
/**
@@ -44,28 +46,6 @@ public class BoundingRectangleType {
@Expose
private Double southBoundingCoordinate;
- /**
- * No args constructor for use in serialization
- *
- */
- public BoundingRectangleType() {
- }
-
- /**
- *
- * @param eastBoundingCoordinate
- * @param northBoundingCoordinate
- * @param southBoundingCoordinate
- * @param westBoundingCoordinate
- */
- public BoundingRectangleType(Double westBoundingCoordinate, Double northBoundingCoordinate, Double eastBoundingCoordinate, Double southBoundingCoordinate) {
- super();
- this.westBoundingCoordinate = westBoundingCoordinate;
- this.northBoundingCoordinate = northBoundingCoordinate;
- this.eastBoundingCoordinate = eastBoundingCoordinate;
- this.southBoundingCoordinate = southBoundingCoordinate;
- }
-
/**
* The longitude value of a spatially referenced point, in degrees. Longitude values range from -180 to 180.
* (Required)
diff --git a/src/main/java/gov/nasa/cumulus/metadata/umm/generated/ExclusiveZoneType.java b/src/main/java/gov/nasa/cumulus/metadata/umm/generated/ExclusiveZoneType.java
index 4f4f595..8649141 100644
--- a/src/main/java/gov/nasa/cumulus/metadata/umm/generated/ExclusiveZoneType.java
+++ b/src/main/java/gov/nasa/cumulus/metadata/umm/generated/ExclusiveZoneType.java
@@ -3,6 +3,7 @@
import java.util.ArrayList;
import java.util.List;
+import javax.annotation.Generated;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
@@ -11,6 +12,7 @@
* Contains the excluded boundaries from the GPolygon.
*
*/
+@Generated("jsonschema2pojo")
public class ExclusiveZoneType {
/**
@@ -22,22 +24,6 @@ public class ExclusiveZoneType {
@Expose
private List boundaries = new ArrayList();
- /**
- * No args constructor for use in serialization
- *
- */
- public ExclusiveZoneType() {
- }
-
- /**
- *
- * @param boundaries
- */
- public ExclusiveZoneType(List boundaries) {
- super();
- this.boundaries = boundaries;
- }
-
/**
*
* (Required)
diff --git a/src/main/java/gov/nasa/cumulus/metadata/umm/generated/GPolygonType.java b/src/main/java/gov/nasa/cumulus/metadata/umm/generated/GPolygonType.java
index c80c932..2a785a0 100644
--- a/src/main/java/gov/nasa/cumulus/metadata/umm/generated/GPolygonType.java
+++ b/src/main/java/gov/nasa/cumulus/metadata/umm/generated/GPolygonType.java
@@ -1,6 +1,7 @@
package gov.nasa.cumulus.metadata.umm.generated;
+import javax.annotation.Generated;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
@@ -9,6 +10,7 @@
* A GPolygon specifies an area on the earth represented by a main boundary with optional boundaries for regions excluded from the main boundary.
*
*/
+@Generated("jsonschema2pojo")
public class GPolygonType {
/**
@@ -27,24 +29,6 @@ public class GPolygonType {
@Expose
private ExclusiveZoneType exclusiveZone;
- /**
- * No args constructor for use in serialization
- *
- */
- public GPolygonType() {
- }
-
- /**
- *
- * @param boundary
- * @param exclusiveZone
- */
- public GPolygonType(BoundaryType boundary, ExclusiveZoneType exclusiveZone) {
- super();
- this.boundary = boundary;
- this.exclusiveZone = exclusiveZone;
- }
-
/**
* A boundary is set of points connected by straight lines representing a polygon on the earth. It takes a minimum of three points to make a boundary. Points must be specified in counter-clockwise order and closed (the first and last vertices are the same).
* (Required)
diff --git a/src/main/java/gov/nasa/cumulus/metadata/umm/generated/GeometryType.java b/src/main/java/gov/nasa/cumulus/metadata/umm/generated/GeometryType.java
index 0ff2cd2..2b3ebdc 100644
--- a/src/main/java/gov/nasa/cumulus/metadata/umm/generated/GeometryType.java
+++ b/src/main/java/gov/nasa/cumulus/metadata/umm/generated/GeometryType.java
@@ -3,6 +3,7 @@
import java.util.LinkedHashSet;
import java.util.Set;
+import javax.annotation.Generated;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
@@ -11,6 +12,7 @@
* This entity holds the geometry representing the spatial coverage information of a granule.
*
*/
+@Generated("jsonschema2pojo")
public class GeometryType {
/**
@@ -42,28 +44,6 @@ public class GeometryType {
@Expose
private Set lines = new LinkedHashSet();
- /**
- * No args constructor for use in serialization
- *
- */
- public GeometryType() {
- }
-
- /**
- *
- * @param boundingRectangles
- * @param lines
- * @param points
- * @param gPolygons
- */
- public GeometryType(Set points, Set boundingRectangles, Set gPolygons, Set lines) {
- super();
- this.points = points;
- this.boundingRectangles = boundingRectangles;
- this.gPolygons = gPolygons;
- this.lines = lines;
- }
-
/**
* The horizontal spatial coverage of a point.
*
diff --git a/src/main/java/gov/nasa/cumulus/metadata/umm/generated/HorizontalSpatialDomainType.java b/src/main/java/gov/nasa/cumulus/metadata/umm/generated/HorizontalSpatialDomainType.java
index 279c1e2..8faaee1 100644
--- a/src/main/java/gov/nasa/cumulus/metadata/umm/generated/HorizontalSpatialDomainType.java
+++ b/src/main/java/gov/nasa/cumulus/metadata/umm/generated/HorizontalSpatialDomainType.java
@@ -1,6 +1,7 @@
package gov.nasa.cumulus.metadata.umm.generated;
+import javax.annotation.Generated;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
@@ -9,6 +10,7 @@
* Information about a granule with horizontal spatial coverage.
*
*/
+@Generated("jsonschema2pojo")
public class HorizontalSpatialDomainType {
/**
@@ -40,28 +42,6 @@ public class HorizontalSpatialDomainType {
@Expose
private TrackType track;
- /**
- * No args constructor for use in serialization
- *
- */
- public HorizontalSpatialDomainType() {
- }
-
- /**
- *
- * @param zoneIdentifier
- * @param geometry
- * @param orbit
- * @param track
- */
- public HorizontalSpatialDomainType(String zoneIdentifier, GeometryType geometry, OrbitType orbit, TrackType track) {
- super();
- this.zoneIdentifier = zoneIdentifier;
- this.geometry = geometry;
- this.orbit = orbit;
- this.track = track;
- }
-
/**
* The appropriate numeric or alpha code used to identify the various zones in the granule's grid coordinate system.
*
diff --git a/src/main/java/gov/nasa/cumulus/metadata/umm/generated/LineType.java b/src/main/java/gov/nasa/cumulus/metadata/umm/generated/LineType.java
index 3b28fe2..09e6a5f 100644
--- a/src/main/java/gov/nasa/cumulus/metadata/umm/generated/LineType.java
+++ b/src/main/java/gov/nasa/cumulus/metadata/umm/generated/LineType.java
@@ -3,6 +3,7 @@
import java.util.ArrayList;
import java.util.List;
+import javax.annotation.Generated;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
@@ -11,6 +12,7 @@
* This entity holds the horizontal spatial coverage of a line. A line area contains at lease two points.
*
*/
+@Generated("jsonschema2pojo")
public class LineType {
/**
@@ -22,22 +24,6 @@ public class LineType {
@Expose
private List points = new ArrayList();
- /**
- * No args constructor for use in serialization
- *
- */
- public LineType() {
- }
-
- /**
- *
- * @param points
- */
- public LineType(List points) {
- super();
- this.points = points;
- }
-
/**
*
* (Required)
diff --git a/src/main/java/gov/nasa/cumulus/metadata/umm/generated/OrbitType.java b/src/main/java/gov/nasa/cumulus/metadata/umm/generated/OrbitType.java
index 3635a06..17db500 100644
--- a/src/main/java/gov/nasa/cumulus/metadata/umm/generated/OrbitType.java
+++ b/src/main/java/gov/nasa/cumulus/metadata/umm/generated/OrbitType.java
@@ -3,6 +3,7 @@
import java.util.HashMap;
import java.util.Map;
+import javax.annotation.Generated;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
@@ -11,6 +12,7 @@
* This entity stores orbital coverage information of the granule. This coverage is an alternative way of expressing granule spatial coverage. This information supports orbital backtrack searching on a granule.
*
*/
+@Generated("jsonschema2pojo")
public class OrbitType {
/**
@@ -54,30 +56,6 @@ public class OrbitType {
@Expose
private OrbitType.OrbitDirectionTypeEnum endDirection;
- /**
- * No args constructor for use in serialization
- *
- */
- public OrbitType() {
- }
-
- /**
- *
- * @param startLatitude
- * @param ascendingCrossing
- * @param endDirection
- * @param startDirection
- * @param endLatitude
- */
- public OrbitType(Double ascendingCrossing, Double startLatitude, OrbitType.OrbitDirectionTypeEnum startDirection, Double endLatitude, OrbitType.OrbitDirectionTypeEnum endDirection) {
- super();
- this.ascendingCrossing = ascendingCrossing;
- this.startLatitude = startLatitude;
- this.startDirection = startDirection;
- this.endLatitude = endLatitude;
- this.endDirection = endDirection;
- }
-
/**
* The longitude value of a spatially referenced point, in degrees. Longitude values range from -180 to 180.
* (Required)
@@ -228,6 +206,7 @@ public boolean equals(Object other) {
* Orbit start and end direction. A for ascending orbit and D for descending.
*
*/
+ @Generated("jsonschema2pojo")
public enum OrbitDirectionTypeEnum {
@SerializedName("A")
@@ -243,7 +222,7 @@ public enum OrbitDirectionTypeEnum {
}
}
- private OrbitDirectionTypeEnum(String value) {
+ OrbitDirectionTypeEnum(String value) {
this.value = value;
}
diff --git a/src/main/java/gov/nasa/cumulus/metadata/umm/generated/PointType.java b/src/main/java/gov/nasa/cumulus/metadata/umm/generated/PointType.java
index 7a93382..905c53b 100644
--- a/src/main/java/gov/nasa/cumulus/metadata/umm/generated/PointType.java
+++ b/src/main/java/gov/nasa/cumulus/metadata/umm/generated/PointType.java
@@ -1,6 +1,7 @@
package gov.nasa.cumulus.metadata.umm.generated;
+import javax.annotation.Generated;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
@@ -9,6 +10,7 @@
* The longitude and latitude values of a spatially referenced point in degrees.
*
*/
+@Generated("jsonschema2pojo")
public class PointType {
/**
@@ -28,24 +30,6 @@ public class PointType {
@Expose
private Double latitude;
- /**
- * No args constructor for use in serialization
- *
- */
- public PointType() {
- }
-
- /**
- *
- * @param latitude
- * @param longitude
- */
- public PointType(Double longitude, Double latitude) {
- super();
- this.longitude = longitude;
- this.latitude = latitude;
- }
-
/**
* The longitude value of a spatially referenced point, in degrees. Longitude values range from -180 to 180.
* (Required)
diff --git a/src/main/java/gov/nasa/cumulus/metadata/umm/generated/RelatedUrlType.java b/src/main/java/gov/nasa/cumulus/metadata/umm/generated/RelatedUrlType.java
index b159e07..d7c1110 100644
--- a/src/main/java/gov/nasa/cumulus/metadata/umm/generated/RelatedUrlType.java
+++ b/src/main/java/gov/nasa/cumulus/metadata/umm/generated/RelatedUrlType.java
@@ -3,6 +3,7 @@
import java.util.HashMap;
import java.util.Map;
+import javax.annotation.Generated;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
@@ -11,6 +12,7 @@
* This entity holds all types of online URL associated with the granule such as guide document or ordering site etc.
*
*/
+@Generated("jsonschema2pojo")
public class RelatedUrlType {
/**
@@ -39,9 +41,13 @@ public class RelatedUrlType {
@SerializedName("Description")
@Expose
private String description;
+ /**
+ * The format that granule data confirms to. While the value is listed as open to any text, CMR requires that it confirm to one of the values on the GranuleDataFormat values in the Keyword Management System: https://gcmd.earthdata.nasa.gov/kms/concepts/concept_scheme/GranuleDataFormat
+ *
+ */
@SerializedName("Format")
@Expose
- private RelatedUrlType.DataFormatEnum format;
+ private String format;
@SerializedName("MimeType")
@Expose
private RelatedUrlType.MimeTypeEnum mimeType;
@@ -60,36 +66,6 @@ public class RelatedUrlType {
@Expose
private RelatedUrlType.FileSizeUnitEnum sizeUnit;
- /**
- * No args constructor for use in serialization
- *
- */
- public RelatedUrlType() {
- }
-
- /**
- *
- * @param size
- * @param subtype
- * @param format
- * @param description
- * @param sizeUnit
- * @param mimeType
- * @param type
- * @param url
- */
- public RelatedUrlType(String url, RelatedUrlType.RelatedUrlTypeEnum type, RelatedUrlType.RelatedUrlSubTypeEnum subtype, String description, RelatedUrlType.DataFormatEnum format, RelatedUrlType.MimeTypeEnum mimeType, Double size, RelatedUrlType.FileSizeUnitEnum sizeUnit) {
- super();
- this.url = url;
- this.type = type;
- this.subtype = subtype;
- this.description = description;
- this.format = format;
- this.mimeType = mimeType;
- this.size = size;
- this.sizeUnit = sizeUnit;
- }
-
/**
* The URL for the relevant resource.
* (Required)
@@ -150,11 +126,19 @@ public void setDescription(String description) {
this.description = description;
}
- public RelatedUrlType.DataFormatEnum getFormat() {
+ /**
+ * The format that granule data confirms to. While the value is listed as open to any text, CMR requires that it confirm to one of the values on the GranuleDataFormat values in the Keyword Management System: https://gcmd.earthdata.nasa.gov/kms/concepts/concept_scheme/GranuleDataFormat
+ *
+ */
+ public String getFormat() {
return format;
}
- public void setFormat(RelatedUrlType.DataFormatEnum format) {
+ /**
+ * The format that granule data confirms to. While the value is listed as open to any text, CMR requires that it confirm to one of the values on the GranuleDataFormat values in the Keyword Management System: https://gcmd.earthdata.nasa.gov/kms/concepts/concept_scheme/GranuleDataFormat
+ *
+ */
+ public void setFormat(String format) {
this.format = format;
}
@@ -268,110 +252,12 @@ public boolean equals(Object other) {
return (((((((((this.size == rhs.size)||((this.size!= null)&&this.size.equals(rhs.size)))&&((this.subtype == rhs.subtype)||((this.subtype!= null)&&this.subtype.equals(rhs.subtype))))&&((this.format == rhs.format)||((this.format!= null)&&this.format.equals(rhs.format))))&&((this.description == rhs.description)||((this.description!= null)&&this.description.equals(rhs.description))))&&((this.sizeUnit == rhs.sizeUnit)||((this.sizeUnit!= null)&&this.sizeUnit.equals(rhs.sizeUnit))))&&((this.mimeType == rhs.mimeType)||((this.mimeType!= null)&&this.mimeType.equals(rhs.mimeType))))&&((this.type == rhs.type)||((this.type!= null)&&this.type.equals(rhs.type))))&&((this.url == rhs.url)||((this.url!= null)&&this.url.equals(rhs.url))));
}
- public enum DataFormatEnum {
-
- @SerializedName("ASCII")
- ASCII("ASCII"),
- @SerializedName("BINARY")
- BINARY("BINARY"),
- @SerializedName("BMP")
- BMP("BMP"),
- @SerializedName("BUFR")
- BUFR("BUFR"),
- @SerializedName("CSV")
- CSV("CSV"),
- @SerializedName("GEOTIFF")
- GEOTIFF("GEOTIFF"),
- @SerializedName("GIF")
- GIF("GIF"),
- @SerializedName("GEOTIFFINT16")
- GEOTIFFINT_16("GEOTIFFINT16"),
- @SerializedName("GEOTIFFFLOAT32")
- GEOTIFFFLOAT_32("GEOTIFFFLOAT32"),
- @SerializedName("GRIB")
- GRIB("GRIB"),
- @SerializedName("GZIP")
- GZIP("GZIP"),
- @SerializedName("HDF4")
- HDF_4("HDF4"),
- @SerializedName("HDF5")
- HDF_5("HDF5"),
- @SerializedName("HDF-EOS2")
- HDF_EOS_2("HDF-EOS2"),
- @SerializedName("HDF-EOS5")
- HDF_EOS_5("HDF-EOS5"),
- @SerializedName("HTML")
- HTML("HTML"),
- @SerializedName("ICARTT")
- ICARTT("ICARTT"),
- @SerializedName("JPEG")
- JPEG("JPEG"),
- @SerializedName("JSON")
- JSON("JSON"),
- @SerializedName("KML")
- KML("KML"),
- @SerializedName("NETCDF-3")
- NETCDF_3("NETCDF-3"),
- @SerializedName("NETCDF-4")
- NETCDF_4("NETCDF-4"),
- @SerializedName("NETCDF-CF")
- NETCDF_CF("NETCDF-CF"),
- @SerializedName("PNG")
- PNG("PNG"),
- @SerializedName("PNG24")
- PNG_24("PNG24"),
- @SerializedName("TAR")
- TAR("TAR"),
- @SerializedName("TIFF")
- TIFF("TIFF"),
- @SerializedName("XLSX")
- XLSX("XLSX"),
- @SerializedName("XML")
- XML("XML"),
- @SerializedName("ZIP")
- ZIP("ZIP"),
- @SerializedName("DMRPP")
- DMRPP("DMRPP"),
- @SerializedName("Not provided")
- NOT_PROVIDED("Not provided");
- private final String value;
- private final static Map CONSTANTS = new HashMap();
-
- static {
- for (RelatedUrlType.DataFormatEnum c: values()) {
- CONSTANTS.put(c.value, c);
- }
- }
-
- private DataFormatEnum(String value) {
- this.value = value;
- }
-
- @Override
- public String toString() {
- return this.value;
- }
-
- public String value() {
- return this.value;
- }
-
- public static RelatedUrlType.DataFormatEnum fromValue(String value) {
- RelatedUrlType.DataFormatEnum constant = CONSTANTS.get(value);
- if (constant == null) {
- throw new IllegalArgumentException(value);
- } else {
- return constant;
- }
- }
-
- }
-
/**
* The unit of the file size.
*
*/
+ @Generated("jsonschema2pojo")
public enum FileSizeUnitEnum {
@SerializedName("KB")
@@ -395,7 +281,7 @@ public enum FileSizeUnitEnum {
}
}
- private FileSizeUnitEnum(String value) {
+ FileSizeUnitEnum(String value) {
this.value = value;
}
@@ -419,6 +305,7 @@ public static RelatedUrlType.FileSizeUnitEnum fromValue(String value) {
}
+ @Generated("jsonschema2pojo")
public enum MimeTypeEnum {
@SerializedName("application/json")
@@ -486,7 +373,7 @@ public enum MimeTypeEnum {
}
}
- private MimeTypeEnum(String value) {
+ MimeTypeEnum(String value) {
this.value = value;
}
@@ -510,6 +397,7 @@ public static RelatedUrlType.MimeTypeEnum fromValue(String value) {
}
+ @Generated("jsonschema2pojo")
public enum RelatedUrlSubTypeEnum {
@SerializedName("MOBILE APP")
@@ -657,7 +545,7 @@ public enum RelatedUrlSubTypeEnum {
}
}
- private RelatedUrlSubTypeEnum(String value) {
+ RelatedUrlSubTypeEnum(String value) {
this.value = value;
}
@@ -681,6 +569,7 @@ public static RelatedUrlType.RelatedUrlSubTypeEnum fromValue(String value) {
}
+ @Generated("jsonschema2pojo")
public enum RelatedUrlTypeEnum {
@SerializedName("DOWNLOAD SOFTWARE")
@@ -710,7 +599,7 @@ public enum RelatedUrlTypeEnum {
}
}
- private RelatedUrlTypeEnum(String value) {
+ RelatedUrlTypeEnum(String value) {
this.value = value;
}
diff --git a/src/main/java/gov/nasa/cumulus/metadata/umm/generated/SpatialExtentType.java b/src/main/java/gov/nasa/cumulus/metadata/umm/generated/SpatialExtentType.java
index 3eb0da3..55d7695 100644
--- a/src/main/java/gov/nasa/cumulus/metadata/umm/generated/SpatialExtentType.java
+++ b/src/main/java/gov/nasa/cumulus/metadata/umm/generated/SpatialExtentType.java
@@ -3,6 +3,7 @@
import java.util.LinkedHashSet;
import java.util.Set;
+import javax.annotation.Generated;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
@@ -11,6 +12,7 @@
* This class contains attributes which describe the spatial extent of a granule. Spatial Extent includes any or all of Granule Localities, Horizontal Spatial Domain, and Vertical Spatial Domain.
*
*/
+@Generated("jsonschema2pojo")
public class SpatialExtentType {
/**
@@ -35,26 +37,6 @@ public class SpatialExtentType {
@Expose
private Set verticalSpatialDomains = new LinkedHashSet();
- /**
- * No args constructor for use in serialization
- *
- */
- public SpatialExtentType() {
- }
-
- /**
- *
- * @param verticalSpatialDomains
- * @param granuleLocalities
- * @param horizontalSpatialDomain
- */
- public SpatialExtentType(Set granuleLocalities, HorizontalSpatialDomainType horizontalSpatialDomain, Set verticalSpatialDomains) {
- super();
- this.granuleLocalities = granuleLocalities;
- this.horizontalSpatialDomain = horizontalSpatialDomain;
- this.verticalSpatialDomains = verticalSpatialDomains;
- }
-
/**
* This entity stores information used at the granule level to describe the labeling of granules with compounded time/space text values and which are subsequently used to define more phenomenological-based granules, thus the locality type and description are contained.
*
diff --git a/src/main/java/gov/nasa/cumulus/metadata/umm/generated/TrackPassTileType.java b/src/main/java/gov/nasa/cumulus/metadata/umm/generated/TrackPassTileType.java
index cf1d2f7..3bf060e 100644
--- a/src/main/java/gov/nasa/cumulus/metadata/umm/generated/TrackPassTileType.java
+++ b/src/main/java/gov/nasa/cumulus/metadata/umm/generated/TrackPassTileType.java
@@ -3,6 +3,7 @@
import java.util.ArrayList;
import java.util.List;
+import javax.annotation.Generated;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
@@ -11,6 +12,7 @@
* This element stores a track pass and its tile information. It will allow a user to search by pass number and their tiles that are contained with in a cycle number. While trying to keep this generic for all to use, this comes from a SWOT requirement where a pass represents a 1/2 orbit. This element will then hold a list of 1/2 orbits and their tiles that together represent the granules spatial extent.
*
*/
+@Generated("jsonschema2pojo")
public class TrackPassTileType {
/**
@@ -29,24 +31,6 @@ public class TrackPassTileType {
@Expose
private List tiles = new ArrayList();
- /**
- * No args constructor for use in serialization
- *
- */
- public TrackPassTileType() {
- }
-
- /**
- *
- * @param tiles
- * @param pass
- */
- public TrackPassTileType(Integer pass, List tiles) {
- super();
- this.pass = pass;
- this.tiles = tiles;
- }
-
/**
* A pass number identifies a subset of a granule's spatial extent. This element holds a pass number that exists in the granule and will allow a user to search by pass number that is contained within a cycle number. While trying to keep this generic for all to use, this comes from a SWOT requirement where a pass represents a 1/2 orbit.
* (Required)
diff --git a/src/main/java/gov/nasa/cumulus/metadata/umm/generated/TrackType.java b/src/main/java/gov/nasa/cumulus/metadata/umm/generated/TrackType.java
index 5f862a3..4f6b4bb 100644
--- a/src/main/java/gov/nasa/cumulus/metadata/umm/generated/TrackType.java
+++ b/src/main/java/gov/nasa/cumulus/metadata/umm/generated/TrackType.java
@@ -3,6 +3,7 @@
import java.util.ArrayList;
import java.util.List;
+import javax.annotation.Generated;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
@@ -11,6 +12,7 @@
* This element stores track information of the granule. Track information is used to allow a user to search for granules whose spatial extent is based on an orbital cycle, pass, and tile mapping. Though it is derived from the SWOT mission requirements, it is intended that this element type be generic enough so that other missions can make use of it. While track information is a type of spatial domain, it is expected that the metadata provider will provide geometry information that matches the spatial extent of the track information.
*
*/
+@Generated("jsonschema2pojo")
public class TrackType {
/**
@@ -23,31 +25,12 @@ public class TrackType {
private Integer cycle;
/**
* A pass number identifies a subset of a granule's spatial extent. This element holds a list of pass numbers and their tiles that exist in the granule. It will allow a user to search by pass number and its tiles that are contained with in a cycle number. While trying to keep this generic for all to use, this comes from a SWOT requirement where a pass represents a 1/2 orbit. This element will then hold a list of 1/2 orbits and their tiles that together represent the granule's spatial extent.
- * (Required)
*
*/
@SerializedName("Passes")
@Expose
private List passes = new ArrayList();
- /**
- * No args constructor for use in serialization
- *
- */
- public TrackType() {
- }
-
- /**
- *
- * @param passes
- * @param cycle
- */
- public TrackType(Integer cycle, List passes) {
- super();
- this.cycle = cycle;
- this.passes = passes;
- }
-
/**
* An integer that represents a specific set of orbital spatial extents defined by passes and tiles. Though intended to be generic, this comes from a SWOT mission requirement where each cycle represents a set of 1/2 orbits. Each 1/2 orbit is called a 'pass'. During science mode, a cycle represents 21 days of 14 full orbits or 588 passes.
* (Required)
@@ -68,7 +51,6 @@ public void setCycle(Integer cycle) {
/**
* A pass number identifies a subset of a granule's spatial extent. This element holds a list of pass numbers and their tiles that exist in the granule. It will allow a user to search by pass number and its tiles that are contained with in a cycle number. While trying to keep this generic for all to use, this comes from a SWOT requirement where a pass represents a 1/2 orbit. This element will then hold a list of 1/2 orbits and their tiles that together represent the granule's spatial extent.
- * (Required)
*
*/
public List getPasses() {
@@ -77,7 +59,6 @@ public List getPasses() {
/**
* A pass number identifies a subset of a granule's spatial extent. This element holds a list of pass numbers and their tiles that exist in the granule. It will allow a user to search by pass number and its tiles that are contained with in a cycle number. While trying to keep this generic for all to use, this comes from a SWOT requirement where a pass represents a 1/2 orbit. This element will then hold a list of 1/2 orbits and their tiles that together represent the granule's spatial extent.
- * (Required)
*
*/
public void setPasses(List passes) {
diff --git a/src/main/java/gov/nasa/cumulus/metadata/umm/generated/VerticalSpatialDomainType.java b/src/main/java/gov/nasa/cumulus/metadata/umm/generated/VerticalSpatialDomainType.java
index a5aeaff..3ece60a 100644
--- a/src/main/java/gov/nasa/cumulus/metadata/umm/generated/VerticalSpatialDomainType.java
+++ b/src/main/java/gov/nasa/cumulus/metadata/umm/generated/VerticalSpatialDomainType.java
@@ -3,6 +3,7 @@
import java.util.HashMap;
import java.util.Map;
+import javax.annotation.Generated;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
@@ -11,6 +12,7 @@
* This entity contains the type and value for the granule's vertical spatial domain.
*
*/
+@Generated("jsonschema2pojo")
public class VerticalSpatialDomainType {
@SerializedName("Type")
@@ -45,30 +47,6 @@ public class VerticalSpatialDomainType {
@Expose
private VerticalSpatialDomainType.Unit unit;
- /**
- * No args constructor for use in serialization
- *
- */
- public VerticalSpatialDomainType() {
- }
-
- /**
- *
- * @param minimumValue
- * @param unit
- * @param type
- * @param value
- * @param maximumValue
- */
- public VerticalSpatialDomainType(VerticalSpatialDomainType.VerticalSpatialDomainTypeEnum type, String value, String minimumValue, String maximumValue, VerticalSpatialDomainType.Unit unit) {
- super();
- this.type = type;
- this.value = value;
- this.minimumValue = minimumValue;
- this.maximumValue = maximumValue;
- this.unit = unit;
- }
-
public VerticalSpatialDomainType.VerticalSpatialDomainTypeEnum getType() {
return type;
}
@@ -201,6 +179,7 @@ public boolean equals(Object other) {
* Describes the unit of the vertical extent value.
*
*/
+ @Generated("jsonschema2pojo")
public enum Unit {
@SerializedName("Fathoms")
@@ -232,7 +211,7 @@ public enum Unit {
}
}
- private Unit(String value) {
+ Unit(String value) {
this.value = value;
}
@@ -256,6 +235,7 @@ public static VerticalSpatialDomainType.Unit fromValue(String value) {
}
+ @Generated("jsonschema2pojo")
public enum VerticalSpatialDomainTypeEnum {
@SerializedName("Atmosphere Layer")
@@ -275,7 +255,7 @@ public enum VerticalSpatialDomainTypeEnum {
}
}
- private VerticalSpatialDomainTypeEnum(String value) {
+ VerticalSpatialDomainTypeEnum(String value) {
this.value = value;
}
diff --git a/src/main/java/gov/nasa/podaac/inventory/model/Granule.java b/src/main/java/gov/nasa/podaac/inventory/model/Granule.java
index 4c2e843..7a5b9a3 100644
--- a/src/main/java/gov/nasa/podaac/inventory/model/Granule.java
+++ b/src/main/java/gov/nasa/podaac/inventory/model/Granule.java
@@ -173,14 +173,6 @@ public String getName() {
public void setName(String name) {
this.name = name;
}
- //officialName
-// public String getOfficialName() {
-// return officialName;
-// }
-//
-// public void setOfficialName(String name) {
-// this.officialName = name;
-// }
public String getRootPath() {
return rootPath;
}
diff --git a/src/test/java/gov/nasa/cumulus/metadata/test/MetadataFilesToEchoTest.java b/src/test/java/gov/nasa/cumulus/metadata/test/MetadataFilesToEchoTest.java
index 3b72240..8d80030 100644
--- a/src/test/java/gov/nasa/cumulus/metadata/test/MetadataFilesToEchoTest.java
+++ b/src/test/java/gov/nasa/cumulus/metadata/test/MetadataFilesToEchoTest.java
@@ -11,6 +11,7 @@
import com.google.gson.GsonBuilder;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
+import cumulus_message_adapter.message_parser.AdapterLogger;
import gov.nasa.cumulus.metadata.aggregator.*;
import gov.nasa.cumulus.metadata.umm.adapter.UMMGCollectionAdapter;
@@ -20,6 +21,8 @@
import gov.nasa.cumulus.metadata.umm.generated.TrackPassTileType;
import gov.nasa.cumulus.metadata.umm.generated.TrackType;
+import gov.nasa.podaac.inventory.model.GranuleCharacter;
+import org.apache.commons.lang3.StringUtils;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
@@ -321,7 +324,13 @@ public void testMarshellCyclePassTileSceneStrToAchiveType() throws IOException,
List tileValues = additionalAttributeType.getValues(); //7F, 8F, 9F, 10F
assertEquals(tileValues.get(0), "7F");
assertEquals(tileValues.get(3), "10F");
-
+ /**
+ * Following section test empty pass. Ex. Cycle: 001, Pass: []
+ */
+ input = "Cycle: 001, Pass: []";
+ isoGranule = mfte.createIsoCyclePassTile(input);
+ trackType = isoGranule.getTrackType();
+ assertEquals(trackType.getCycle(), new Integer("1"));
}
@Test
@@ -373,6 +382,36 @@ public void testReadIsoMendsMetadataFile() throws IOException, ParseException, X
assertEquals(tiles.get(6), "8R");
List additionalAttributeTypes = isoGranule.getAdditionalAttributeTypes();
assertEquals(additionalAttributeTypes.size(), 3);
+
+ /**
+ * Test the behavior of reading SWOT ISO MENDS Orbit and Footprint
+ */
+ file = new File(classLoader.getResource("SWOT_L2_HR_RiverAvg_487_SI_35_20230410T200018_20230411T195056_TGB0_01.zip.iso.xml").getFile());
+ cfgFile = new File(classLoader.getResource("MODIS_T-JPL-L2P-v2014.0.cmr.cfg").getFile());
+ mfte = new MetadataFilesToEcho(true);
+
+
+ mfte.readConfiguration(cfgFile.getAbsolutePath());
+ doc = mfte.makeDoc(file.getAbsolutePath());
+ xpath = mfte.makeXpath(doc);
+ isoGranule = mfte.readIsoMendsMetadataFile("s3://mybucket/mygranule.nc", doc, xpath);
+ isoGranule.getOrbit();
+ Set granuleCharacters = isoGranule.getGranuleCharacterSet();
+ for (GranuleCharacter granuleCharacter : granuleCharacters) {
+ if (granuleCharacter.getDatasetElement().getElementDD().getShortName().equals("line")) {
+ assertTrue(StringUtils.equals("46.7666666666667 151.802777777778 51.353523932563 179.39615512424 51.3618572658963 179.44615512424 51.3673094007704 179.460468207465 51.3720831976997 179.470818074544 51.9544606526693 179.77399359809 51.962745836046 179.775655449761 65.0256 180.0 65.0243570963542 -179.993114725749 64.2422505696615 -173.124080403646 64.2416666666667 -173.0875 64.2589111328125 -172.942587619358 64.3993570963542 -172.234684583876 66.0076904296875 -169.718114556207 66.0260301378038 -169.70074496799 66.0760314941406 -169.659073554145 66.0902187771267 -169.657690429687 66.1322906494141 -169.675703599718 66.1409630669488 -169.684376017253 71.3826697455512 -175.542419433594 71.4159271240235 -175.726031833225 71.4173094007704 -175.740315416124 71.5993445502387 -178.950753445095 71.6086161295573 -179.125728691949 71.6076221042209 -179.174432712131 71.6005043877496 -179.364869689941 71.5840138753255 -179.63235405816 71.5756805419922 -179.756760321723 71.5339 180.0 71.5409488254123 179.982556491428 76.1909840901693 152.824263509115 76.7576266818576 149.457624986437 76.7590138753255 149.384906344944 76.2006429036458 138.826448059082 75.8756427341037 135.72644788954 75.8408372667101 135.68353644477 71.075 130.025 69.1791666666667 128.695833333333 69.1199666341146 128.666011216905 67.6083333333333 128.1375 67.59375 128.133802117242 66.4433797200521 128.049646674262 66.4350755479601 128.050353325738 66.4208333333333 128.054166666667 65.9953955756294 128.247048102485 55.5633509318034 135.546684095595 55.5125 135.604166666667 46.7844919840495 151.737613932292 46.7714508056641 151.764506530762 46.7672841389974 151.781173197428 46.7666666666667 151.802777777778",
+ StringUtils.trim(granuleCharacter.getValue())));
+ }
+ }
+ }
+
+ @Test
+ public void testIsOrbitExisting() {
+ MetadataFilesToEcho mfte = new MetadataFilesToEcho(true);
+ assertFalse(mfte.isOrbitExisting(""));
+ assertFalse(mfte.isOrbitExisting(null));
+ assertTrue(mfte.isOrbitExisting("AscendingCrossing: 22.45 StartLatitude: -77.66 StartDirection: A EndLatitude: 77.66 EndDirection: A"));
+ assertFalse(mfte.isOrbitExisting("AscendingCrossing: 22.45 StartLatitude: -77.66 StartDirection: None EndLatitude: 77.66 EndDirection: A"));
}