{"action":"created","comment":{"url":"https://api.github.com/repos/codice/alliance/pulls/comments/76153653","id":76153653,"diff_hunk":"@@ -0,0 +1,1289 @@\n+/**\n+ * Copyright (c) Codice Foundation\n+ * <p/>\n+ * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser\n+ * General Public License as published by the Free Software Foundation, either version 3 of the\n+ * License, or any later version.\n+ * <p/>\n+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without\n+ * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n+ * Lesser General Public License for more details. A copy of the GNU Lesser General Public License\n+ * is distributed along with this program and can be found at\n+ * <http://www.gnu.org/licenses/lgpl.html>.\n+ **/\n+package org.codice.alliance.catalog.converter.mgmp;\n+\n+import java.io.Serializable;\n+import java.net.URI;\n+import java.util.Arrays;\n+import java.util.Collections;\n+import java.util.Date;\n+import java.util.GregorianCalendar;\n+import java.util.List;\n+import java.util.Locale;\n+import java.util.Objects;\n+import java.util.Optional;\n+import java.util.OptionalDouble;\n+import java.util.concurrent.atomic.AtomicBoolean;\n+import java.util.function.BiConsumer;\n+import java.util.function.Function;\n+import java.util.function.Predicate;\n+import java.util.stream.Collectors;\n+import java.util.stream.Stream;\n+\n+import org.apache.commons.lang.StringUtils;\n+import org.codice.alliance.catalog.core.api.types.Isr;\n+import org.codice.alliance.catalog.transformer.mgmp.MgmpConstants;\n+import org.codice.ddf.spatial.ogc.csw.catalog.common.GmdConstants;\n+import org.codice.ddf.spatial.ogc.csw.catalog.converter.AbstractGmdConverter;\n+import org.codice.ddf.spatial.ogc.csw.catalog.converter.XstreamPathValueTracker;\n+import org.slf4j.Logger;\n+import org.slf4j.LoggerFactory;\n+\n+import com.thoughtworks.xstream.io.path.Path;\n+import com.vividsolutions.jts.geom.Coordinate;\n+import com.vividsolutions.jts.geom.Geometry;\n+import com.vividsolutions.jts.io.ParseException;\n+import com.vividsolutions.jts.io.WKTReader;\n+\n+import ddf.catalog.data.Attribute;\n+import ddf.catalog.data.impl.MetacardImpl;\n+import ddf.catalog.data.types.Associations;\n+import ddf.catalog.data.types.Contact;\n+import ddf.catalog.data.types.Core;\n+import ddf.catalog.data.types.DateTime;\n+import ddf.catalog.data.types.Location;\n+import ddf.catalog.data.types.Media;\n+import ddf.catalog.data.types.Topic;\n+\n+/**\n+ * Not thread safe.\n+ */\n+public class MgmpConverter extends AbstractGmdConverter {\n+\n+    public static final String RESOURCE_SECURITY_CODE_LIST_PATH =\n+            \"/MD_Metadata/identificationInfo/MD_DataIdentification/resourceConstraints/mgmp:MGMP_SecurityConstraints/classification/MD_ClassificationCode/@codeList\";\n+\n+    public static final String RESOURCE_ORIGINATOR_SECURITY_CODE_LIST_PATH =\n+            \"/MD_Metadata/identificationInfo/MD_DataIdentification/resourceConstraints/mgmp:MGMP_SecurityConstraints/mgmp:originatorClassification/MD_ClassificationCode/@codeList\";\n+\n+    public static final String RESOURCE_STATUS_CODE_LIST_PATH =\n+            \"/MD_Metadata/identificationInfo/MD_DataIdentification/status/MD_ProgressCode/@codeList\";\n+\n+    public static final String GMD_MIN_ALTITUDE_PATH =\n+            \"/MD_Metadata/identificationInfo/MD_DataIdentification/extent/EX_Extent/verticalElement/EX_VerticalExtent/minimumValue/gco:Real\";\n+\n+    public static final String GMD_VERTICAL_CRS_XLINK_HREF_PATH =\n+            \"/MD_Metadata/identificationInfo/MD_DataIdentification/extent/EX_Extent/verticalElement/EX_VerticalExtent/verticalCRS/@xlink:href\";\n+\n+    public static final String GMD_VERTICAL_CRS_XLINK_TITLE_PATH =\n+            \"/MD_Metadata/identificationInfo/MD_DataIdentification/extent/EX_Extent/verticalElement/EX_VerticalExtent/verticalCRS/@xlink:title\";\n+\n+    public static final String ASSOCIATIONS_RELATED_CODE_SPACE_PATH =\n+            \"/MD_Metadata/identificationInfo/MD_DataIdentification/aggregationInfo/MD_AggregateInformation/aggregateDataSetIdentifier/RS_Identifier/codeSpace/gco:CharacterString\";\n+\n+    public static final String ASSOCIATIONS_RELATED_TYPE_CODE_LIST_PATH =\n+            \"/MD_Metadata/identificationInfo/MD_DataIdentification/aggregationInfo/MD_AggregateInformation/associationType/DS_AssociationTypeCode/@codeList\";\n+\n+    public static final String ASSOCIATIONS_RELATED_TYPE_CODE_LIST_VALUE_PATH =\n+            \"/MD_Metadata/identificationInfo/MD_DataIdentification/aggregationInfo/MD_AggregateInformation/associationType/DS_AssociationTypeCode/@codeListValue\";\n+\n+    public static final String ASSOCIATIONS_RELATED_TYPE_TEXT_PATH =\n+            \"/MD_Metadata/identificationInfo/MD_DataIdentification/aggregationInfo/MD_AggregateInformation/associationType/DS_AssociationTypeCode\";\n+\n+    public static final String SECURITY_METADATA_CLASSIFICATION_ATTRIBUTE =","path":"catalog/transformer/catalog-transformer-mgmp/src/main/java/org/codice/alliance/catalog/converter/mgmp/MgmpConverter.java","position":94,"original_position":94,"commit_id":"0a4f8ab03f85ccb469026414e7b5e7bf39a5c091","original_commit_id":"0a4f8ab03f85ccb469026414e7b5e7bf39a5c091","user":{"login":"glenhein","id":17837152,"avatar_url":"https://avatars.githubusercontent.com/u/17837152?v=3","gravatar_id":"","url":"https://api.github.com/users/glenhein","html_url":"https://github.com/glenhein","followers_url":"https://api.github.com/users/glenhein/followers","following_url":"https://api.github.com/users/glenhein/following{/other_user}","gists_url":"https://api.github.com/users/glenhein/gists{/gist_id}","starred_url":"https://api.github.com/users/glenhein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glenhein/subscriptions","organizations_url":"https://api.github.com/users/glenhein/orgs","repos_url":"https://api.github.com/users/glenhein/repos","events_url":"https://api.github.com/users/glenhein/events{/privacy}","received_events_url":"https://api.github.com/users/glenhein/received_events","type":"User","site_admin":false},"body":"changed","created_at":"2016-08-24T22:47:11Z","updated_at":"2016-08-24T22:47:11Z","html_url":"https://github.com/codice/alliance/pull/131#discussion_r76153653","pull_request_url":"https://api.github.com/repos/codice/alliance/pulls/131","_links":{"self":{"href":"https://api.github.com/repos/codice/alliance/pulls/comments/76153653"},"html":{"href":"https://github.com/codice/alliance/pull/131#discussion_r76153653"},"pull_request":{"href":"https://api.github.com/repos/codice/alliance/pulls/131"}}},"pull_request":{"url":"https://api.github.com/repos/codice/alliance/pulls/131","id":82398967,"html_url":"https://github.com/codice/alliance/pull/131","diff_url":"https://github.com/codice/alliance/pull/131.diff","patch_url":"https://github.com/codice/alliance/pull/131.patch","issue_url":"https://api.github.com/repos/codice/alliance/issues/131","number":131,"state":"open","locked":false,"title":"CAL-115 create metacard transformer for MGMPv2","user":{"login":"glenhein","id":17837152,"avatar_url":"https://avatars.githubusercontent.com/u/17837152?v=3","gravatar_id":"","url":"https://api.github.com/users/glenhein","html_url":"https://github.com/glenhein","followers_url":"https://api.github.com/users/glenhein/followers","following_url":"https://api.github.com/users/glenhein/following{/other_user}","gists_url":"https://api.github.com/users/glenhein/gists{/gist_id}","starred_url":"https://api.github.com/users/glenhein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glenhein/subscriptions","organizations_url":"https://api.github.com/users/glenhein/orgs","repos_url":"https://api.github.com/users/glenhein/repos","events_url":"https://api.github.com/users/glenhein/events{/privacy}","received_events_url":"https://api.github.com/users/glenhein/received_events","type":"User","site_admin":false},"body":"#### What does this PR do?\r\nCreate a metcard transformer to generate an MGMPv2 xml document.\r\n\r\n*** **This is a preliminary PR. This code is not ready for merge. The unit tests are not even close. Just review MgmpConverter.** ***\r\n\r\n#### Who is reviewing it (please choose AT LEAST two reviewers that need to approve the PR before it can get merged; if a component team is listed, at least one of its members needs to approve)?\r\n@bdeining \r\n@jrnorth \r\n#### Choose 2 committers to review/merge the PR (please choose ONLY two committers from below, delete the rest).\r\n@jlcsmith\r\n@kcwire\r\n#### How should this be tested?\r\n#### Any background context you want to provide?\r\n#### What are the relevant tickets?\r\nCAL-115\r\n#### Screenshots (if appropriate)\r\n#### Checklist:\r\n- [ ] Documentation Updated\r\n- [ ] Update / Add Unit Tests\r\n- [ ] Update / Add Integration Tests\r\n\r\n","created_at":"2016-08-23T16:35:44Z","updated_at":"2016-08-24T22:47:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e5b60b093698e7ef6f82ca8afde528b9d1331100","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/codice/alliance/pulls/131/commits","review_comments_url":"https://api.github.com/repos/codice/alliance/pulls/131/comments","review_comment_url":"https://api.github.com/repos/codice/alliance/pulls/comments{/number}","comments_url":"https://api.github.com/repos/codice/alliance/issues/131/comments","statuses_url":"https://api.github.com/repos/codice/alliance/statuses/0a4f8ab03f85ccb469026414e7b5e7bf39a5c091","head":{"label":"glenhein:CAL-115","ref":"CAL-115","sha":"0a4f8ab03f85ccb469026414e7b5e7bf39a5c091","user":{"login":"glenhein","id":17837152,"avatar_url":"https://avatars.githubusercontent.com/u/17837152?v=3","gravatar_id":"","url":"https://api.github.com/users/glenhein","html_url":"https://github.com/glenhein","followers_url":"https://api.github.com/users/glenhein/followers","following_url":"https://api.github.com/users/glenhein/following{/other_user}","gists_url":"https://api.github.com/users/glenhein/gists{/gist_id}","starred_url":"https://api.github.com/users/glenhein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glenhein/subscriptions","organizations_url":"https://api.github.com/users/glenhein/orgs","repos_url":"https://api.github.com/users/glenhein/repos","events_url":"https://api.github.com/users/glenhein/events{/privacy}","received_events_url":"https://api.github.com/users/glenhein/received_events","type":"User","site_admin":false},"repo":{"id":56005607,"name":"alliance","full_name":"glenhein/alliance","owner":{"login":"glenhein","id":17837152,"avatar_url":"https://avatars.githubusercontent.com/u/17837152?v=3","gravatar_id":"","url":"https://api.github.com/users/glenhein","html_url":"https://github.com/glenhein","followers_url":"https://api.github.com/users/glenhein/followers","following_url":"https://api.github.com/users/glenhein/following{/other_user}","gists_url":"https://api.github.com/users/glenhein/gists{/gist_id}","starred_url":"https://api.github.com/users/glenhein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glenhein/subscriptions","organizations_url":"https://api.github.com/users/glenhein/orgs","repos_url":"https://api.github.com/users/glenhein/repos","events_url":"https://api.github.com/users/glenhein/events{/privacy}","received_events_url":"https://api.github.com/users/glenhein/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/glenhein/alliance","description":"","fork":true,"url":"https://api.github.com/repos/glenhein/alliance","forks_url":"https://api.github.com/repos/glenhein/alliance/forks","keys_url":"https://api.github.com/repos/glenhein/alliance/keys{/key_id}","collaborators_url":"https://api.github.com/repos/glenhein/alliance/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/glenhein/alliance/teams","hooks_url":"https://api.github.com/repos/glenhein/alliance/hooks","issue_events_url":"https://api.github.com/repos/glenhein/alliance/issues/events{/number}","events_url":"https://api.github.com/repos/glenhein/alliance/events","assignees_url":"https://api.github.com/repos/glenhein/alliance/assignees{/user}","branches_url":"https://api.github.com/repos/glenhein/alliance/branches{/branch}","tags_url":"https://api.github.com/repos/glenhein/alliance/tags","blobs_url":"https://api.github.com/repos/glenhein/alliance/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/glenhein/alliance/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/glenhein/alliance/git/refs{/sha}","trees_url":"https://api.github.com/repos/glenhein/alliance/git/trees{/sha}","statuses_url":"https://api.github.com/repos/glenhein/alliance/statuses/{sha}","languages_url":"https://api.github.com/repos/glenhein/alliance/languages","stargazers_url":"https://api.github.com/repos/glenhein/alliance/stargazers","contributors_url":"https://api.github.com/repos/glenhein/alliance/contributors","subscribers_url":"https://api.github.com/repos/glenhein/alliance/subscribers","subscription_url":"https://api.github.com/repos/glenhein/alliance/subscription","commits_url":"https://api.github.com/repos/glenhein/alliance/commits{/sha}","git_commits_url":"https://api.github.com/repos/glenhein/alliance/git/commits{/sha}","comments_url":"https://api.github.com/repos/glenhein/alliance/comments{/number}","issue_comment_url":"https://api.github.com/repos/glenhein/alliance/issues/comments{/number}","contents_url":"https://api.github.com/repos/glenhein/alliance/contents/{+path}","compare_url":"https://api.github.com/repos/glenhein/alliance/compare/{base}...{head}","merges_url":"https://api.github.com/repos/glenhein/alliance/merges","archive_url":"https://api.github.com/repos/glenhein/alliance/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/glenhein/alliance/downloads","issues_url":"https://api.github.com/repos/glenhein/alliance/issues{/number}","pulls_url":"https://api.github.com/repos/glenhein/alliance/pulls{/number}","milestones_url":"https://api.github.com/repos/glenhein/alliance/milestones{/number}","notifications_url":"https://api.github.com/repos/glenhein/alliance/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/glenhein/alliance/labels{/name}","releases_url":"https://api.github.com/repos/glenhein/alliance/releases{/id}","deployments_url":"https://api.github.com/repos/glenhein/alliance/deployments","created_at":"2016-04-11T20:33:23Z","updated_at":"2016-04-11T20:33:25Z","pushed_at":"2016-08-24T22:21:39Z","git_url":"git://github.com/glenhein/alliance.git","ssh_url":"git@github.com:glenhein/alliance.git","clone_url":"https://github.com/glenhein/alliance.git","svn_url":"https://github.com/glenhein/alliance","homepage":null,"size":19403,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"codice:master","ref":"master","sha":"66d9f4afcdb354bdcef105c6a2f38059ddf9729b","user":{"login":"codice","id":2386734,"avatar_url":"https://avatars.githubusercontent.com/u/2386734?v=3","gravatar_id":"","url":"https://api.github.com/users/codice","html_url":"https://github.com/codice","followers_url":"https://api.github.com/users/codice/followers","following_url":"https://api.github.com/users/codice/following{/other_user}","gists_url":"https://api.github.com/users/codice/gists{/gist_id}","starred_url":"https://api.github.com/users/codice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codice/subscriptions","organizations_url":"https://api.github.com/users/codice/orgs","repos_url":"https://api.github.com/users/codice/repos","events_url":"https://api.github.com/users/codice/events{/privacy}","received_events_url":"https://api.github.com/users/codice/received_events","type":"Organization","site_admin":false},"repo":{"id":52804523,"name":"alliance","full_name":"codice/alliance","owner":{"login":"codice","id":2386734,"avatar_url":"https://avatars.githubusercontent.com/u/2386734?v=3","gravatar_id":"","url":"https://api.github.com/users/codice","html_url":"https://github.com/codice","followers_url":"https://api.github.com/users/codice/followers","following_url":"https://api.github.com/users/codice/following{/other_user}","gists_url":"https://api.github.com/users/codice/gists{/gist_id}","starred_url":"https://api.github.com/users/codice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codice/subscriptions","organizations_url":"https://api.github.com/users/codice/orgs","repos_url":"https://api.github.com/users/codice/repos","events_url":"https://api.github.com/users/codice/events{/privacy}","received_events_url":"https://api.github.com/users/codice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/codice/alliance","description":"","fork":false,"url":"https://api.github.com/repos/codice/alliance","forks_url":"https://api.github.com/repos/codice/alliance/forks","keys_url":"https://api.github.com/repos/codice/alliance/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codice/alliance/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codice/alliance/teams","hooks_url":"https://api.github.com/repos/codice/alliance/hooks","issue_events_url":"https://api.github.com/repos/codice/alliance/issues/events{/number}","events_url":"https://api.github.com/repos/codice/alliance/events","assignees_url":"https://api.github.com/repos/codice/alliance/assignees{/user}","branches_url":"https://api.github.com/repos/codice/alliance/branches{/branch}","tags_url":"https://api.github.com/repos/codice/alliance/tags","blobs_url":"https://api.github.com/repos/codice/alliance/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codice/alliance/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codice/alliance/git/refs{/sha}","trees_url":"https://api.github.com/repos/codice/alliance/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codice/alliance/statuses/{sha}","languages_url":"https://api.github.com/repos/codice/alliance/languages","stargazers_url":"https://api.github.com/repos/codice/alliance/stargazers","contributors_url":"https://api.github.com/repos/codice/alliance/contributors","subscribers_url":"https://api.github.com/repos/codice/alliance/subscribers","subscription_url":"https://api.github.com/repos/codice/alliance/subscription","commits_url":"https://api.github.com/repos/codice/alliance/commits{/sha}","git_commits_url":"https://api.github.com/repos/codice/alliance/git/commits{/sha}","comments_url":"https://api.github.com/repos/codice/alliance/comments{/number}","issue_comment_url":"https://api.github.com/repos/codice/alliance/issues/comments{/number}","contents_url":"https://api.github.com/repos/codice/alliance/contents/{+path}","compare_url":"https://api.github.com/repos/codice/alliance/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codice/alliance/merges","archive_url":"https://api.github.com/repos/codice/alliance/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codice/alliance/downloads","issues_url":"https://api.github.com/repos/codice/alliance/issues{/number}","pulls_url":"https://api.github.com/repos/codice/alliance/pulls{/number}","milestones_url":"https://api.github.com/repos/codice/alliance/milestones{/number}","notifications_url":"https://api.github.com/repos/codice/alliance/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codice/alliance/labels{/name}","releases_url":"https://api.github.com/repos/codice/alliance/releases{/id}","deployments_url":"https://api.github.com/repos/codice/alliance/deployments","created_at":"2016-02-29T16:10:33Z","updated_at":"2016-06-14T21:40:26Z","pushed_at":"2016-08-24T22:21:40Z","git_url":"git://github.com/codice/alliance.git","ssh_url":"git@github.com:codice/alliance.git","clone_url":"https://github.com/codice/alliance.git","svn_url":"https://github.com/codice/alliance","homepage":null,"size":19728,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":26,"mirror_url":null,"open_issues_count":9,"forks":26,"open_issues":9,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/codice/alliance/pulls/131"},"html":{"href":"https://github.com/codice/alliance/pull/131"},"issue":{"href":"https://api.github.com/repos/codice/alliance/issues/131"},"comments":{"href":"https://api.github.com/repos/codice/alliance/issues/131/comments"},"review_comments":{"href":"https://api.github.com/repos/codice/alliance/pulls/131/comments"},"review_comment":{"href":"https://api.github.com/repos/codice/alliance/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/codice/alliance/pulls/131/commits"},"statuses":{"href":"https://api.github.com/repos/codice/alliance/statuses/0a4f8ab03f85ccb469026414e7b5e7bf39a5c091"}}}}
{"actor":{"display_login":"glenhein"}}