diff --git a/.github/workflows/build-pipeline.yml b/.github/workflows/build-pipeline.yml index 89b418c..ed92309 100644 --- a/.github/workflows/build-pipeline.yml +++ b/.github/workflows/build-pipeline.yml @@ -24,7 +24,7 @@ jobs: - uses: actions/setup-java@v2 with: distribution: 'adopt' - java-version: '8.0.232' + java-version: '11.0.6' - uses: gradle/gradle-build-action@v1 with: gradle-version: 8.0.1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f01357..da830c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,22 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [8.6.0] +### Added +- **PODAAC-5876** + - Update to use CMA 2.0.0, thus allowing 2.0.3 layer for lambda + - Update build to use java 11 + - To generate java 11 compatible UMMG schema POJOs, jsonschema2pojo shall make use of command line parameter: --target-version 1.11 +### Deprecated +### Removed +### Fixed +- **PODAAC-5857** + - Fixed the issue so footprint and bbx do not always appear together while isoXmlSpatial is configured to footprint only + - remove request.close() statement in CMRLambdaRestClient so the response could be pulled out and logged properly instead of always logging apache chunk read error due to the http channel was closed. + - adding more parameters to Jsonschema2pojo plugin to generate proper pojo from ummg schema +### Security +- Snyk: Security upgrade com.amazonaws:aws-java-sdk-s3 from 1.12.544 to 1.12.641 + ## [8.5.0] ### Added - **PODAAC-5594** diff --git a/VERSION b/VERSION index 6d28907..acd405b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.5.0 +8.6.0 diff --git a/build.gradle b/build.gradle index cf5189b..fe36db4 100755 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ apply plugin: 'java' -sourceCompatibility = 1.8 -targetCompatibility = 1.8 +sourceCompatibility = 11 +targetCompatibility = 11 dependencies { implementation fileTree(dir: 'target/dependency/', include: '*.jar') diff --git a/pom.xml b/pom.xml index c319a95..3a4f8e9 100755 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ 4.0.0 gov.nasa.podaac cumulus-metadata-aggregator - 8.5.0 + 8.6.0-rc.7 jar Metadata-Aggregator @@ -22,8 +22,8 @@ TODO - 1.8 - 1.8 + 11 + 11 UTF-8 UTF-8 @@ -39,12 +39,12 @@ gov.nasa.earthdata cumulus-message-adapter - 1.3.9 + 2.0.0 com.amazonaws aws-java-sdk-s3 - 1.12.544 + 1.12.641 @@ -133,6 +133,12 @@ 4.5.1 test + + + javax.xml.bind + jaxb-api + 2.3.1 + src/main/java @@ -172,14 +178,16 @@ org.jsonschema2pojo jsonschema2pojo-maven-plugin - 1.0.2 + 1.2.1 ${basedir}/src/main/resources/jsonschema src/main/java gov.nasa.cumulus.metadata.umm.generated jsonschema GSON - true + false + 11 + false true true true 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 a059372..df41d3b 100644 --- a/src/main/java/gov/nasa/cumulus/metadata/aggregator/CMRLambdaRestClient.java +++ b/src/main/java/gov/nasa/cumulus/metadata/aggregator/CMRLambdaRestClient.java @@ -76,7 +76,6 @@ public CMRLambdaRestClient(String cert, String pass, String tknHost, this.echoHost = cmrHost; URIBuilder uriBuilder = new URIBuilder(tknHost); this.tokenHost = uriBuilder.setPath(uriBuilder.getPath() + "/gettoken").build().normalize().toString(); - AdapterLogger.LogInfo(this.className + " final token url:" + this.tokenHost); this.validHost = this.tokenHost.replaceAll("gettoken", "validate"); this.region = region; this.tknBucket = tknBucket; @@ -105,7 +104,6 @@ public String getToken() JSONObject jsonTkn = readToken(); long fileTime = getTokenStartTime(jsonTkn); if (jsonTkn == null || sessionExpired(fileTime, runTime)) { - AdapterLogger.LogDebug(this.className + " Generating new NAMS token..."); try { this.token = buildToken(runTime); } catch (Exception e) { @@ -113,7 +111,6 @@ public String getToken() throw new IOException("Could not retrieve token..." + e); } } else { - AdapterLogger.LogDebug(this.className + " Session active, using saved token"); this.token = (String) jsonTkn.get("token"); } return this.token; @@ -261,7 +258,6 @@ private JSONObject readToken() } String localTokenFilePath = s3Utils.download(this.region, this.tknBucket, this.tknFilePath, Paths.get(this.workingDir, "token.json").toString()); - AdapterLogger.LogInfo(this.className + " downloaded token file to local:" + localTokenFilePath); JSONObject json = null; try (FileReader reader = new FileReader(String.valueOf(localTokenFilePath))) { json = (JSONObject) parser.parse(reader); @@ -278,7 +274,6 @@ private void writeToken(long timeStamp, String token) JSONObject json = new JSONObject(); json.put("authTime", timeStamp); json.put("token", token); - AdapterLogger.LogDebug(this.className + " Writing new token to file"); Path localTknFilePath = Files.write(Paths.get(this.workingDir, "token.json"), json.toString().getBytes()); s3Utils.upload(region, this.tknBucket, this.tknFilePath, new File(localTknFilePath.toString()) ); @@ -302,7 +297,6 @@ private HttpResponse send(String url, HttpEntity entity) request.setHeader("Content-Type", content_type); // Send the request HttpResponse response = httpClient.execute(request); - request.releaseConnection(); return response; } @@ -314,7 +308,6 @@ public HttpResponse validateUMMG(String provider, String granuleId, String strU String validateUMMGUri = uriBuilder.setPath(uriBuilder.getPath() + "/ingest/providers/" + provider +"/validate/granule/" + granuleId) .build().normalize().toString(); - AdapterLogger.LogDebug("validateUri:" + validateUMMGUri); HttpEntity httpEntity = new StringEntity(strUMMG, "utf-8"); HttpResponse httpResponse = send(validateUMMGUri, httpEntity); return httpResponse; diff --git a/src/main/java/gov/nasa/cumulus/metadata/aggregator/CMRRestClient.java b/src/main/java/gov/nasa/cumulus/metadata/aggregator/CMRRestClient.java index bc91291..a87ce25 100644 --- a/src/main/java/gov/nasa/cumulus/metadata/aggregator/CMRRestClient.java +++ b/src/main/java/gov/nasa/cumulus/metadata/aggregator/CMRRestClient.java @@ -191,8 +191,6 @@ private void send(String url, HttpEntity entity) throws IOException { } else { logHttpResponse(response, HttpOp.SEND); } - // close the connection - request.releaseConnection(); } public void closeScrollSession(String scrollJson) throws IOException { diff --git a/src/main/java/gov/nasa/cumulus/metadata/aggregator/IsoGranule.java b/src/main/java/gov/nasa/cumulus/metadata/aggregator/IsoGranule.java index 44265c2..9de4709 100644 --- a/src/main/java/gov/nasa/cumulus/metadata/aggregator/IsoGranule.java +++ b/src/main/java/gov/nasa/cumulus/metadata/aggregator/IsoGranule.java @@ -20,7 +20,7 @@ public class IsoGranule extends UMMGranule { private List inputGranules; private String PGEVersionClass; - private IsoType isoType; + public IsoGranule() { this.identifiers = new HashMap<>(); @@ -130,12 +130,4 @@ public String getPGEVersionClass() { public void setPGEVersionClass(String PGEVersionClass) { this.PGEVersionClass = PGEVersionClass; } - - public IsoType getIsoType() { - return isoType; - } - - public void setIsoType(IsoType isoType) { - this.isoType = isoType; - } } 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 fd9c0a3..405f71f 100644 --- a/src/main/java/gov/nasa/cumulus/metadata/aggregator/MetadataFilesToEcho.java +++ b/src/main/java/gov/nasa/cumulus/metadata/aggregator/MetadataFilesToEcho.java @@ -10,7 +10,6 @@ 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; @@ -324,12 +323,12 @@ public void readIsoMetadataFile(String file, String s3Location) throws ParserCon // if we get here, we have the bare minimum fields already populated, // so try and parse the rest of the granule metadata... try { + ((IsoGranule) this.granule).setIsoType(isoType); if (isoType == IsoType.MENDS) { AdapterLogger.LogInfo("Found MENDS file"); readIsoMendsMetadataFile(s3Location, doc, xpath); } else if (isoType == IsoType.SMAP) { AdapterLogger.LogInfo("Found SMAP file"); - ((IsoGranule) this.granule).setIsoType(isoType); readIsoSmapMetadataFile(s3Location, doc, xpath); } else { AdapterLogger.LogWarning(isoType.name() + " didn't match any expected ISO type, skipping optional " + @@ -486,7 +485,6 @@ public IsoGranule readIsoMendsMetadataFile(String s3Location, Document doc, XPat ((IsoGranule) granule).setOrbit(MENDsISOXmlUtiils.extractXPathValueSwallowException(doc, xpath, IsoMendsXPath.ORBIT, "IsoMendsXPath.ORBIT")); ((IsoGranule) granule).setSwotTrack(MENDsISOXmlUtiils.extractXPathValueSwallowException(doc, xpath, IsoMendsXPath.SWOT_TRACK, "IsoMendsXPath.SWOT_TRACK")); - Source source = new Source(); source.setSourceShortName(MENDsISOXmlUtiils.extractXPathValueSwallowException(doc, xpath, IsoMendsXPath.PLATFORM, "IsoMendsXPath.PLATFORM")); @@ -511,7 +509,7 @@ public IsoGranule readIsoMendsMetadataFile(String s3Location, Document doc, XPat String cyclePassTileSceneStr =StringUtils.trim(MENDsISOXmlUtiils.extractXPathValueSwallowException(doc, xpath, IsoMendsXPath.CYCLE_PASS_TILE_SCENE, "IsoMendsXPath.CYCLE_PASS_TILE_SCENE")); if(!StringUtils.isBlank(cyclePassTileSceneStr)) { try { - createIsoCyclePassTile(cyclePassTileSceneStr); + granule = createIsoCyclePassTile(cyclePassTileSceneStr); } catch (Exception e) { // Since TrackType which contains Cycle Pass Tile and Scenes is not a required field // we catch exception with printStackTrace to know the exact line throwing error 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 e796080..5ca022c 100644 --- a/src/main/java/gov/nasa/cumulus/metadata/aggregator/UMMGranuleFile.java +++ b/src/main/java/gov/nasa/cumulus/metadata/aggregator/UMMGranuleFile.java @@ -420,7 +420,8 @@ private JSONObject exportTemporal() { */ private boolean shouldAddBBx(Granule granule) { boolean shouldAddBBx = false; - if(granule !=null && granule instanceof gov.nasa.cumulus.metadata.aggregator.UMMGranule) { + + if(granule !=null && granule.getIsoType() == null) { shouldAddBBx = true; } // if the granule object is IsoGranule type and it is SMAP mission, then we check if polygon was added. @@ -430,6 +431,7 @@ private boolean shouldAddBBx(Granule granule) { && StringUtils.isNotEmpty(((IsoGranule) granule).getPolygon())) { shouldAddBBx = false; } + AdapterLogger.LogInfo(this.className + " shouldAddBBx:" + shouldAddBBx); return shouldAddBBx; } @@ -453,6 +455,7 @@ private JSONObject exportSpatial() throws ParseException{ AdapterLogger.LogInfo(this.className + " nc.iso.xml footprint processing ... "); this.isLineFormattedPolygon = true; geometry = line2Polygons(geometry,polygon); + horizontalSpatialDomain.put("Geometry", geometry); } if(this.isoXMLSpatialTypeEnumHashSet.contains(MENDsIsoXMLSpatialTypeEnum.ORBIT)) { AdapterLogger.LogDebug(this.className + "UMMGranuleFile.exportSpatial ORBIT Processing"); @@ -478,13 +481,18 @@ private JSONObject exportSpatial() throws ParseException{ isoBBoxAlreadyProcessed = true; horizontalSpatialDomain = this.appendBoundingRectangles(geometry, horizontalSpatialDomain); } - // Export track - if (((IsoGranule) granule).getSwotTrack() != "") { + // Export track for isoXML SMAP + // look into : IsoSmapXPath.SWOT_TRACK and how we use it to grab and store coordinate string to granule's + // swotTrack string. We also store swotTrack to MENDs granule and IsoXPath.SWOT_TRACK and IsoMendsXPath.CYCLE_PASS_TILE_SCENE + // these 2 values are being used to "extrac" cycle pass string from eith MENDs or SMAP. However, smap cycle and pass + // are being processed below + if (((IsoGranule) granule).getSwotTrack() != "" && granule.getIsoType() == IsoType.SMAP) { JSONObject track = new JSONObject(); horizontalSpatialDomain.put("Track", track); Pattern trackPattern = Pattern.compile("Cycle:\\s(.*)\\sPass:\\s(.*)\\sTile:\\s(.*)"); Matcher trackMatcher = trackPattern.matcher(((IsoGranule) granule).getSwotTrack()); if (trackMatcher.find()) { + AdapterLogger.LogDebug("SWOT track found cycle"); track.put("Cycle", Integer.parseInt(trackMatcher.group(1))); JSONArray passes = new JSONArray(); track.put("Passes", passes); @@ -510,17 +518,15 @@ private JSONObject exportSpatial() throws ParseException{ } } // end of processing IsoGranule + // following is a large block code to deal with None IsoXML (MENDs or SMAP) bounding box // We can only include orbital or bounding-box data, not both // if iso Bounding Box already processed in logic above, then don't enter this block if (foundOrbitalData == false && !isoBBoxAlreadyProcessed) { - horizontalSpatialDomain.put("Geometry", geometry); - JSONArray boundingRectangles = new JSONArray(); - geometry.put("BoundingRectangles", boundingRectangles); double north = 0, south = 0, east = 0, west = 0; - if(granule !=null && granule instanceof gov.nasa.cumulus.metadata.aggregator.UMMGranule) { + if(granule !=null && granule.getIsoType() == null) { east = ((UMMGranule) granule).getBbxEasternLongitude() != null ? ((UMMGranule) granule).getBbxEasternLongitude() : 0; west = ((UMMGranule) granule).getBbxWesternLongitude() != null? @@ -565,7 +571,6 @@ private JSONObject exportSpatial() throws ParseException{ // and make sure we turn off the rangeIs360 flag this.rangeIs360 = false; } - BigDecimal nrth = new BigDecimal(north); BigDecimal sth = new BigDecimal(south); nrth = nrth.setScale(3, RoundingMode.HALF_UP); @@ -609,9 +614,17 @@ private JSONObject exportSpatial() throws ParseException{ } } } - } - // Export track if cycle and pass exists + if (boundingRectangles.size() > 0) { + geometry.put("BoundingRectangles", boundingRectangles); + } + } + // Export TrackType + // MENDS : ISO + // Or Non-iso track : such as MODIS_A and Sentinel-6 + // for instance, iso MENDS and Sentinel-6 and MODIS_A are having TrackType created within MetadataFilesToEcho class + // if cycle and pass exists. MENDs is taking adavangate of UMMG generated pojo : TrackType + // which is stored within the UMMGranule if (granule instanceof UMMGranule) { /** * Track include cycle and passes(array). 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 7ea0b49..21e88fc 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,7 +3,6 @@ import java.util.ArrayList; import java.util.List; -import javax.annotation.Generated; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; @@ -12,7 +11,6 @@ * 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 { /** 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 556453e..e4aca53 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,7 +3,6 @@ import java.util.ArrayList; import java.util.List; -import javax.annotation.Generated; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; @@ -12,7 +11,6 @@ * 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 { /** 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 2de05df..5bbd991 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,7 +1,6 @@ package gov.nasa.cumulus.metadata.umm.generated; -import javax.annotation.Generated; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; @@ -10,7 +9,6 @@ * This entity holds the horizontal spatial coverage of a bounding box. * */ -@Generated("jsonschema2pojo") public class BoundingRectangleType { /** 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 8649141..ecedbb4 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,7 +3,6 @@ import java.util.ArrayList; import java.util.List; -import javax.annotation.Generated; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; @@ -12,7 +11,6 @@ * Contains the excluded boundaries from the GPolygon. * */ -@Generated("jsonschema2pojo") public class ExclusiveZoneType { /** 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 2a785a0..d57a4d4 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,7 +1,6 @@ package gov.nasa.cumulus.metadata.umm.generated; -import javax.annotation.Generated; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; @@ -10,7 +9,6 @@ * 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 { /** 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 2b3ebdc..6eda0f4 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,7 +3,6 @@ import java.util.LinkedHashSet; import java.util.Set; -import javax.annotation.Generated; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; @@ -12,7 +11,6 @@ * This entity holds the geometry representing the spatial coverage information of a granule. * */ -@Generated("jsonschema2pojo") public class GeometryType { /** 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 8faaee1..ae42034 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,7 +1,6 @@ package gov.nasa.cumulus.metadata.umm.generated; -import javax.annotation.Generated; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; @@ -10,7 +9,6 @@ * Information about a granule with horizontal spatial coverage. * */ -@Generated("jsonschema2pojo") public class HorizontalSpatialDomainType { /** 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 09e6a5f..d55c423 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,7 +3,6 @@ import java.util.ArrayList; import java.util.List; -import javax.annotation.Generated; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; @@ -12,7 +11,6 @@ * This entity holds the horizontal spatial coverage of a line. A line area contains at lease two points. * */ -@Generated("jsonschema2pojo") public class LineType { /** 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 17db500..8b07027 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,7 +3,6 @@ import java.util.HashMap; import java.util.Map; -import javax.annotation.Generated; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; @@ -12,7 +11,6 @@ * 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 { /** @@ -206,7 +204,6 @@ 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") 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 905c53b..627eea0 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,7 +1,6 @@ package gov.nasa.cumulus.metadata.umm.generated; -import javax.annotation.Generated; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; @@ -10,7 +9,6 @@ * The longitude and latitude values of a spatially referenced point in degrees. * */ -@Generated("jsonschema2pojo") public class PointType { /** 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 d7c1110..6f3ccac 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,30 +3,28 @@ import java.util.HashMap; import java.util.Map; -import javax.annotation.Generated; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; /** * 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 { /** * The URL for the relevant resource. * (Required) - * + * */ @SerializedName("URL") @Expose private String url; /** - * + * * (Required) - * + * */ @SerializedName("Type") @Expose @@ -36,14 +34,14 @@ public class RelatedUrlType { private RelatedUrlType.RelatedUrlSubTypeEnum subtype; /** * Description of the web page at this URL. - * + * */ @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 @@ -53,14 +51,14 @@ public class RelatedUrlType { private RelatedUrlType.MimeTypeEnum mimeType; /** * The size of the resource. - * + * */ @SerializedName("Size") @Expose private Double size; /** * The unit of the file size. - * + * */ @SerializedName("SizeUnit") @Expose @@ -69,7 +67,7 @@ public class RelatedUrlType { /** * The URL for the relevant resource. * (Required) - * + * */ public String getUrl() { return url; @@ -78,25 +76,25 @@ public String getUrl() { /** * The URL for the relevant resource. * (Required) - * + * */ public void setUrl(String url) { this.url = url; } /** - * + * * (Required) - * + * */ public RelatedUrlType.RelatedUrlTypeEnum getType() { return type; } /** - * + * * (Required) - * + * */ public void setType(RelatedUrlType.RelatedUrlTypeEnum type) { this.type = type; @@ -112,7 +110,7 @@ public void setSubtype(RelatedUrlType.RelatedUrlSubTypeEnum subtype) { /** * Description of the web page at this URL. - * + * */ public String getDescription() { return description; @@ -120,7 +118,7 @@ public String getDescription() { /** * Description of the web page at this URL. - * + * */ public void setDescription(String description) { this.description = description; @@ -128,7 +126,7 @@ public void setDescription(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 - * + * */ public String getFormat() { return format; @@ -136,7 +134,7 @@ public String 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 void setFormat(String format) { this.format = format; @@ -152,7 +150,7 @@ public void setMimeType(RelatedUrlType.MimeTypeEnum mimeType) { /** * The size of the resource. - * + * */ public Double getSize() { return size; @@ -160,7 +158,7 @@ public Double getSize() { /** * The size of the resource. - * + * */ public void setSize(Double size) { this.size = size; @@ -168,7 +166,7 @@ public void setSize(Double size) { /** * The unit of the file size. - * + * */ public RelatedUrlType.FileSizeUnitEnum getSizeUnit() { return sizeUnit; @@ -176,7 +174,7 @@ public RelatedUrlType.FileSizeUnitEnum getSizeUnit() { /** * The unit of the file size. - * + * */ public void setSizeUnit(RelatedUrlType.FileSizeUnitEnum sizeUnit) { this.sizeUnit = sizeUnit; @@ -255,9 +253,8 @@ public boolean equals(Object other) { /** * The unit of the file size. - * + * */ - @Generated("jsonschema2pojo") public enum FileSizeUnitEnum { @SerializedName("KB") @@ -305,7 +302,6 @@ public static RelatedUrlType.FileSizeUnitEnum fromValue(String value) { } - @Generated("jsonschema2pojo") public enum MimeTypeEnum { @SerializedName("application/json") @@ -397,7 +393,6 @@ public static RelatedUrlType.MimeTypeEnum fromValue(String value) { } - @Generated("jsonschema2pojo") public enum RelatedUrlSubTypeEnum { @SerializedName("MOBILE APP") @@ -569,7 +564,6 @@ public static RelatedUrlType.RelatedUrlSubTypeEnum fromValue(String value) { } - @Generated("jsonschema2pojo") public enum RelatedUrlTypeEnum { @SerializedName("DOWNLOAD SOFTWARE") 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 55d7695..9c8cf66 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,7 +3,6 @@ import java.util.LinkedHashSet; import java.util.Set; -import javax.annotation.Generated; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; @@ -12,7 +11,6 @@ * 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 { /** 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 3bf060e..ecf7c81 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,7 +3,6 @@ import java.util.ArrayList; import java.util.List; -import javax.annotation.Generated; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; @@ -12,7 +11,6 @@ * 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 { /** 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 4f6b4bb..3aec256 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,29 +3,27 @@ import java.util.ArrayList; import java.util.List; -import javax.annotation.Generated; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; /** * 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 { /** * 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) - * + * */ @SerializedName("Cycle") @Expose 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. - * + * */ @SerializedName("Passes") @Expose @@ -34,7 +32,7 @@ public class TrackType { /** * 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) - * + * */ public Integer getCycle() { return cycle; @@ -43,7 +41,7 @@ public Integer getCycle() { /** * 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) - * + * */ public void setCycle(Integer cycle) { this.cycle = cycle; @@ -51,7 +49,7 @@ 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. - * + * */ public List getPasses() { return passes; @@ -59,7 +57,7 @@ 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. - * + * */ public void setPasses(List passes) { this.passes = 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 3ece60a..907ef0e 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,7 +3,6 @@ import java.util.HashMap; import java.util.Map; -import javax.annotation.Generated; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; @@ -12,7 +11,6 @@ * This entity contains the type and value for the granule's vertical spatial domain. * */ -@Generated("jsonschema2pojo") public class VerticalSpatialDomainType { @SerializedName("Type") @@ -179,7 +177,6 @@ public boolean equals(Object other) { * Describes the unit of the vertical extent value. * */ - @Generated("jsonschema2pojo") public enum Unit { @SerializedName("Fathoms") @@ -235,7 +232,6 @@ public static VerticalSpatialDomainType.Unit fromValue(String value) { } - @Generated("jsonschema2pojo") public enum VerticalSpatialDomainTypeEnum { @SerializedName("Atmosphere Layer") diff --git a/src/main/java/gov/nasa/podaac/inventory/model/DatasetCitation.java b/src/main/java/gov/nasa/podaac/inventory/model/DatasetCitation.java index 4581de1..8f75173 100644 --- a/src/main/java/gov/nasa/podaac/inventory/model/DatasetCitation.java +++ b/src/main/java/gov/nasa/podaac/inventory/model/DatasetCitation.java @@ -95,7 +95,7 @@ public Date getReleaseDate() { */ public void setReleaseDate(Date releaseDate) { this.releaseDate = releaseDate; - this.releaseDateLong = new Long(releaseDate.getTime()); + this.releaseDateLong = releaseDate.getTime(); } public Long getReleaseDateLong() { diff --git a/src/main/java/gov/nasa/podaac/inventory/model/DatasetCoverage.java b/src/main/java/gov/nasa/podaac/inventory/model/DatasetCoverage.java index 160f33f..7bf2fe1 100644 --- a/src/main/java/gov/nasa/podaac/inventory/model/DatasetCoverage.java +++ b/src/main/java/gov/nasa/podaac/inventory/model/DatasetCoverage.java @@ -147,7 +147,7 @@ public Date getStartTime() { */ public void setStartTime(Date startTime) { this.startTime = startTime; - this.startTimeLong = new Long(startTime.getTime()); + this.startTimeLong = startTime.getTime(); } /** * @return the stopTime @@ -160,7 +160,7 @@ public Date getStopTime() { */ public void setStopTime(Date stopTime) { this.stopTime = stopTime; - this.stopTimeLong = new Long(stopTime.getTime()); + this.stopTimeLong = stopTime.getTime(); } public Long getStartTimeLong() { diff --git a/src/main/java/gov/nasa/podaac/inventory/model/DatasetDateTime.java b/src/main/java/gov/nasa/podaac/inventory/model/DatasetDateTime.java index 42ac1a9..fe6eee1 100644 --- a/src/main/java/gov/nasa/podaac/inventory/model/DatasetDateTime.java +++ b/src/main/java/gov/nasa/podaac/inventory/model/DatasetDateTime.java @@ -34,7 +34,7 @@ public DatasetDateTime() { public DatasetDateTime(DatasetElement element, Date keyValue) { this.datasetElement = element; this.value = keyValue; - this.valueLong = new Long(value.getTime()); + this.valueLong = keyValue.getTime(); } public DatasetDateTime(DatasetElement element, Long keyValue) { @@ -74,7 +74,7 @@ public Long getValueLong() { public void setValue(Date value) { this.value = value; - this.valueLong = new Long(value.getTime()); + this.valueLong = value.getTime(); } diff --git a/src/main/java/gov/nasa/podaac/inventory/model/DatasetMetaHistory.java b/src/main/java/gov/nasa/podaac/inventory/model/DatasetMetaHistory.java index 9c74f09..26e338c 100644 --- a/src/main/java/gov/nasa/podaac/inventory/model/DatasetMetaHistory.java +++ b/src/main/java/gov/nasa/podaac/inventory/model/DatasetMetaHistory.java @@ -78,7 +78,7 @@ public Date getEchoSubmitDate() { } public void setEchoSubmitDate(Date echoSubmitDate) { this.echoSubmitDate = echoSubmitDate; - this.echoSubmitDateLong = new Long(echoSubmitDate.getTime()); + this.echoSubmitDateLong = echoSubmitDate.getTime(); } public Long getEchoSubmitDateLong() { @@ -103,14 +103,14 @@ public Date getCreationDate() { } public void setCreationDate(Date creationDate) { this.creationDate = creationDate; - this.creationDateLong = new Long(creationDate.getTime()); + this.creationDateLong = creationDate.getTime(); } public Date getLastRevisionDate() { return lastRevisionDate; } public void setLastRevisionDate(Date lastRevisionDate) { this.lastRevisionDate = lastRevisionDate; - this.lastRevisionDateLong = new Long(lastRevisionDate.getTime()); + this.lastRevisionDateLong = lastRevisionDate.getTime(); } diff --git a/src/main/java/gov/nasa/podaac/inventory/model/DatasetSoftware.java b/src/main/java/gov/nasa/podaac/inventory/model/DatasetSoftware.java index c4ffa29..eed0475 100644 --- a/src/main/java/gov/nasa/podaac/inventory/model/DatasetSoftware.java +++ b/src/main/java/gov/nasa/podaac/inventory/model/DatasetSoftware.java @@ -54,7 +54,7 @@ public Date getSoftwareDate() { } public void setSoftwareDate(Date softwareDate) { this.softwareDate = softwareDate; - this.softwareDateLong = new Long(softwareDate.getTime()); + this.softwareDateLong = softwareDate.getTime(); } public Long getSoftwareDateLong() { diff --git a/src/main/java/gov/nasa/podaac/inventory/model/DatasetVersion.java b/src/main/java/gov/nasa/podaac/inventory/model/DatasetVersion.java index 5d22f91..ef42a9a 100644 --- a/src/main/java/gov/nasa/podaac/inventory/model/DatasetVersion.java +++ b/src/main/java/gov/nasa/podaac/inventory/model/DatasetVersion.java @@ -79,7 +79,7 @@ public Date getVersionDate() { } public void setVersionDate(Date versionDate) { this.versionDate = versionDate; - this.versionDateLong = new Long(versionDate.getTime()); + this.versionDateLong = versionDate.getTime(); } public Long getVersionDateLong() { 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 7a5b9a3..0968d4d 100644 --- a/src/main/java/gov/nasa/podaac/inventory/model/Granule.java +++ b/src/main/java/gov/nasa/podaac/inventory/model/Granule.java @@ -4,6 +4,7 @@ package gov.nasa.podaac.inventory.model; +import gov.nasa.cumulus.metadata.aggregator.IsoType; import gov.nasa.podaac.inventory.api.Constant.GranuleStatus; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -63,6 +64,8 @@ public class Granule { private Set metaHistorySet = new HashSet(); private Set granuleContactSet = new HashSet(); private Dataset dataset; + + private IsoType isoType; private static Log log = LogFactory.getLog(Granule.class); @@ -78,39 +81,39 @@ public Granule(String name, Date startTime, Date requestedTime, Date acquiredTim this.name = name; try{ - this.startTimeLong = new Long(startTime.getTime()); + this.startTimeLong = startTime.getTime(); }catch(NullPointerException npe) { this.startTimeLong = null; } try{ - this.stopTimeLong = new Long(stopTime.getTime()); + this.stopTimeLong = stopTime.getTime(); }catch(NullPointerException npe) { this.stopTimeLong = null; } try{ - this.createTimeLong = new Long(createTime.getTime()); + this.createTimeLong = createTime.getTime(); }catch(NullPointerException npe) { this.createTimeLong = null; } try{ - this.ingestTimeLong = new Long(ingestTime.getTime()); + this.ingestTimeLong = ingestTime.getTime(); }catch(NullPointerException npe) { this.ingestTimeLong = null; } this.version = version; try{ - this.requestedTimeLong = new Long(requestedTime.getTime()); + this.requestedTimeLong = requestedTime.getTime(); }catch(NullPointerException npe) { this.requestedTimeLong = null; } try{ - this.acquiredTimeLong = new Long(acquiredTime.getTime()); + this.acquiredTimeLong = acquiredTime.getTime(); }catch(NullPointerException npe) { this.acquiredTimeLong = null; @@ -121,7 +124,7 @@ public Granule(String name, Date startTime, Date requestedTime, Date acquiredTim this.checksumType = checksumType; this.status = status; try{ - this.archiveTimeLong = new Long(archiveTime.getTime()); + this.archiveTimeLong = archiveTime.getTime(); }catch(NullPointerException npe) { this.archiveTimeLong = null; @@ -197,7 +200,7 @@ public Date getStartTime() { public void setStartTime(Date startTime) { this.startTime = startTime; - this.startTimeLong = new Long(startTime.getTime()); + this.startTimeLong = startTime.getTime(); } public Date getStopTime() { @@ -206,7 +209,7 @@ public Date getStopTime() { public void setStopTime(Date stopTime) { this.stopTime = stopTime; - this.stopTimeLong = new Long(stopTime.getTime()); + this.stopTimeLong = stopTime.getTime(); } @@ -216,7 +219,7 @@ public Date getAcquiredTime() { public void setAcquiredTime(Date acquiredTime) { this.acquiredTime = acquiredTime; - this.acquiredTimeLong = new Long(acquiredTime.getTime()); + this.acquiredTimeLong = acquiredTime.getTime(); } public Date getRequestedTime() { return requestedTime; @@ -224,7 +227,7 @@ public Date getRequestedTime() { public void setRequestedTime(Date requestedTime) { this.requestedTime = requestedTime; - this.requestedTimeLong = new Long(requestedTime.getTime()); + this.requestedTimeLong = requestedTime.getTime(); } public Date getArchiveTime() { @@ -233,7 +236,7 @@ public Date getArchiveTime() { public void setArchiveTime(Date archiveTime) { this.archiveTime = archiveTime; - this.archiveTimeLong = new Long(archiveTime.getTime()); + this.archiveTimeLong = archiveTime.getTime(); } public Date getCreateTime() { @@ -242,7 +245,7 @@ public Date getCreateTime() { public void setCreateTime(Date createTime) { this.createTime = createTime; - this.createTimeLong = new Long(createTime.getTime()); + this.createTimeLong = createTime.getTime(); } public Date getIngestTime() { @@ -251,7 +254,7 @@ public Date getIngestTime() { public void setIngestTime(Date ingestTime) { this.ingestTime = ingestTime; - this.ingestTimeLong = new Long(ingestTime.getTime()); + this.ingestTimeLong = ingestTime.getTime(); } public Date getVerifyTime() { @@ -260,7 +263,7 @@ public Date getVerifyTime() { public void setVerifyTime(Date verifyTime) { this.verifyTime = verifyTime; - this.verifyTimeLong = new Long(verifyTime.getTime()); + this.verifyTimeLong = verifyTime.getTime(); } public Integer getVersion() { @@ -847,7 +850,14 @@ public int compareFields(Object orig, Object inc){ } } } - + + public IsoType getIsoType() { + return isoType; + } + + public void setIsoType(IsoType isoType) { + this.isoType = isoType; + } } diff --git a/src/main/java/gov/nasa/podaac/inventory/model/GranuleDateTime.java b/src/main/java/gov/nasa/podaac/inventory/model/GranuleDateTime.java index 1d50b80..0532e30 100644 --- a/src/main/java/gov/nasa/podaac/inventory/model/GranuleDateTime.java +++ b/src/main/java/gov/nasa/podaac/inventory/model/GranuleDateTime.java @@ -27,7 +27,7 @@ public GranuleDateTime(DatasetElement element, Date keyValue) { this.datasetElement = element; this.value = keyValue; try{ - this.valueLong = new Long(keyValue.getTime()); + this.valueLong = keyValue.getTime(); }catch(NullPointerException npe) { this.valueLong = null; @@ -75,7 +75,7 @@ public Long getValueLong() { public void setValue(Date value) { this.value = value; - this.valueLong = new Long(value.getTime()); + this.valueLong = value.getTime(); } @Override diff --git a/src/main/java/gov/nasa/podaac/inventory/model/GranuleMetaHistory.java b/src/main/java/gov/nasa/podaac/inventory/model/GranuleMetaHistory.java index d9ad422..b6aeaef 100644 --- a/src/main/java/gov/nasa/podaac/inventory/model/GranuleMetaHistory.java +++ b/src/main/java/gov/nasa/podaac/inventory/model/GranuleMetaHistory.java @@ -83,14 +83,14 @@ public Date getCreationDate() { } public void setCreationDate(Date creationDate) { this.creationDate = creationDate; - this.creationDateLong = new Long(creationDate.getTime()); + this.creationDateLong = creationDate.getTime(); } public Date getLastRevisionDate() { return lastRevisionDate; } public void setLastRevisionDate(Date lastRevisionDate) { this.lastRevisionDate = lastRevisionDate; - this.lastRevisionDateLong = new Long(lastRevisionDate.getTime()); + this.lastRevisionDateLong = lastRevisionDate.getTime(); } public String getRevisionHistory() { return revisionHistory; @@ -103,7 +103,7 @@ public Date getEchoSubmitDate() { } public void setEchoSubmitDate(Date echoSubmitDate) { this.echoSubmitDate = echoSubmitDate; - this.echoSubmitDateLong = new Long(echoSubmitDate.getTime()); + this.echoSubmitDateLong = echoSubmitDate.getTime(); } public Long getCreationDateLong() { diff --git a/src/main/java/gov/nasa/podaac/inventory/model/Provider.java b/src/main/java/gov/nasa/podaac/inventory/model/Provider.java index 9a953dd..1bf642e 100644 --- a/src/main/java/gov/nasa/podaac/inventory/model/Provider.java +++ b/src/main/java/gov/nasa/podaac/inventory/model/Provider.java @@ -26,7 +26,7 @@ public Integer getProviderId() { return providerId; } public void setProviderId(Integer providerId) { - this.providerId = new Integer(providerId); + this.providerId = providerId; } public String getShortName() { return shortName;