{"action":"created","comment":{"url":"https://api.github.com/repos/ngageoint/six-library/pulls/comments/93703864","pull_request_review_id":14232237,"id":93703864,"diff_hunk":"@@ -0,0 +1,373 @@\n+/* =========================================================================\n+ * This file is part of six-c++\n+ * =========================================================================\n+ *\n+ * (C) Copyright 2004 - 2016, MDA Information Systems LLC\n+ *\n+ * six-c++ is free software; you can redistribute it and/or modify\n+ * it under the terms of the GNU Lesser General Public License as published by\n+ * the Free Software Foundation; either version 3 of the License, or\n+ * (at your option) any later version.\n+ *\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ * GNU Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with this program; If not,\n+ * see <http://www.gnu.org/licenses/>.\n+ *\n+ */\n+#include <iostream>\n+#include <sstream>\n+\n+#include <sys/DLL.h>\n+#include <sys/Conf.h>\n+#include <except/Exception.h>\n+#include <six/Utilities.h>\n+#include <six/sidd/DerivedXMLControl.h>\n+#include <six/sidd/Utilities.h>\n+#include <scene/ECEFToLLATransform.h>\n+\n+// CSM includes\n+#include <RasterGM.h>\n+#include <Plugin.h>\n+#include <NitfIsd.h>\n+\n+\n+namespace\n+{\n+std::string toString(nitf::FileSecurity security)\n+{\n+    const std::string str = security.getClassificationSystem().toString() +\n+            security.getCodewords().toString() +\n+            security.getControlAndHandling().toString() +\n+            security.getReleasingInstructions().toString() +\n+            security.getDeclassificationType().toString() +\n+            security.getDeclassificationDate().toString() +\n+            security.getDeclassificationExemption().toString() +\n+            security.getDowngrade().toString() +\n+            security.getDowngradeDateTime().toString() +\n+            security.getClassificationText().toString() +\n+            security.getClassificationAuthorityType().toString() +\n+            security.getClassificationAuthority().toString() +\n+            security.getClassificationReason().toString() +\n+            security.getSecuritySourceDate().toString() +\n+            security.getSecurityControlNumber().toString();\n+\n+    return str;\n+}\n+\n+std::string toString(nitf::DESubheader subheader)\n+{\n+    const nitf::Uint32 subheaderFieldsLen(subheader.getSubheaderFieldsLength());\n+\n+    std::ostringstream ostr;\n+    ostr << subheader.getFilePartType().toString()\n+         << subheader.getTypeID().toString()\n+         << subheader.getVersion().toString()\n+         << subheader.getSecurityClass().toString()\n+         << toString(subheader.getSecurityGroup())\n+         << std::setw(4) << std::setfill('0') << subheaderFieldsLen;\n+\n+    // This tacks on XML_DATA_CONTENT when applicable\n+    if (subheaderFieldsLen > 0)\n+    {\n+        nitf::TRE tre = subheader.getSubheaderFields();\n+        for (nitf::TRE::Iterator iter = tre.begin(); iter != tre.end(); ++iter)\n+        {\n+            nitf::Pair pair = *iter;\n+            ostr << tre.getField(pair.getKey()).toString();\n+        }\n+    }\n+\n+    return ostr.str();\n+}\n+\n+class Test\n+{\n+public:\n+    Test(const std::string& siddPathname,\n+         const std::string& confDir,\n+         const csm::Plugin& plugin) :\n+        mSiddPathname(siddPathname),\n+        mPlugin(plugin)\n+    {\n+        // Read in the SICD XML","path":"six/projects/csm/tests/test_sidd_csm.cpp","position":97,"original_position":97,"commit_id":"dba49d758e665c6f2005527047203fd9e29dda84","original_commit_id":"dba49d758e665c6f2005527047203fd9e29dda84","user":{"login":"asylvest","id":11707082,"avatar_url":"https://avatars.githubusercontent.com/u/11707082?v=3","gravatar_id":"","url":"https://api.github.com/users/asylvest","html_url":"https://github.com/asylvest","followers_url":"https://api.github.com/users/asylvest/followers","following_url":"https://api.github.com/users/asylvest/following{/other_user}","gists_url":"https://api.github.com/users/asylvest/gists{/gist_id}","starred_url":"https://api.github.com/users/asylvest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asylvest/subscriptions","organizations_url":"https://api.github.com/users/asylvest/orgs","repos_url":"https://api.github.com/users/asylvest/repos","events_url":"https://api.github.com/users/asylvest/events{/privacy}","received_events_url":"https://api.github.com/users/asylvest/received_events","type":"User","site_admin":false},"body":"Comment should say SIDD","created_at":"2016-12-22T22:05:06Z","updated_at":"2016-12-22T22:07:53Z","html_url":"https://github.com/ngageoint/six-library/pull/138#discussion_r93703864","pull_request_url":"https://api.github.com/repos/ngageoint/six-library/pulls/138","_links":{"self":{"href":"https://api.github.com/repos/ngageoint/six-library/pulls/comments/93703864"},"html":{"href":"https://github.com/ngageoint/six-library/pull/138#discussion_r93703864"},"pull_request":{"href":"https://api.github.com/repos/ngageoint/six-library/pulls/138"}}},"pull_request":{"url":"https://api.github.com/repos/ngageoint/six-library/pulls/138","id":98482437,"html_url":"https://github.com/ngageoint/six-library/pull/138","diff_url":"https://github.com/ngageoint/six-library/pull/138.diff","patch_url":"https://github.com/ngageoint/six-library/pull/138.patch","issue_url":"https://api.github.com/repos/ngageoint/six-library/issues/138","number":138,"state":"open","locked":false,"title":"WIP: Add SIX CSM tests","user":{"login":"asylvest","id":11707082,"avatar_url":"https://avatars.githubusercontent.com/u/11707082?v=3","gravatar_id":"","url":"https://api.github.com/users/asylvest","html_url":"https://github.com/asylvest","followers_url":"https://api.github.com/users/asylvest/followers","following_url":"https://api.github.com/users/asylvest/following{/other_user}","gists_url":"https://api.github.com/users/asylvest/gists{/gist_id}","starred_url":"https://api.github.com/users/asylvest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asylvest/subscriptions","organizations_url":"https://api.github.com/users/asylvest/orgs","repos_url":"https://api.github.com/users/asylvest/repos","events_url":"https://api.github.com/users/asylvest/events{/privacy}","received_events_url":"https://api.github.com/users/asylvest/received_events","type":"User","site_admin":false},"body":"Added an application which can call the CSM interface directly to support testing the CSM plugins more easily than going through vts.  Have a set of todos that need to still be done.\r\n\r\n@JonathanMeans ","created_at":"2016-12-18T18:14:42Z","updated_at":"2016-12-22T22:07:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cc8fcebcc7dd174cc10dcde6782574bd1bab4c06","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/ngageoint/six-library/milestones/6","html_url":"https://github.com/ngageoint/six-library/milestone/6","labels_url":"https://api.github.com/repos/ngageoint/six-library/milestones/6/labels","id":2146944,"number":6,"title":"SIX 2.2.7","description":"","creator":{"login":"asylvest","id":11707082,"avatar_url":"https://avatars.githubusercontent.com/u/11707082?v=3","gravatar_id":"","url":"https://api.github.com/users/asylvest","html_url":"https://github.com/asylvest","followers_url":"https://api.github.com/users/asylvest/followers","following_url":"https://api.github.com/users/asylvest/following{/other_user}","gists_url":"https://api.github.com/users/asylvest/gists{/gist_id}","starred_url":"https://api.github.com/users/asylvest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asylvest/subscriptions","organizations_url":"https://api.github.com/users/asylvest/orgs","repos_url":"https://api.github.com/users/asylvest/repos","events_url":"https://api.github.com/users/asylvest/events{/privacy}","received_events_url":"https://api.github.com/users/asylvest/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":12,"state":"open","created_at":"2016-11-20T21:14:14Z","updated_at":"2016-12-20T18:05:28Z","due_on":"2017-01-01T08:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/ngageoint/six-library/pulls/138/commits","review_comments_url":"https://api.github.com/repos/ngageoint/six-library/pulls/138/comments","review_comment_url":"https://api.github.com/repos/ngageoint/six-library/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ngageoint/six-library/issues/138/comments","statuses_url":"https://api.github.com/repos/ngageoint/six-library/statuses/dba49d758e665c6f2005527047203fd9e29dda84","head":{"label":"ngageoint:add_csm_tests","ref":"add_csm_tests","sha":"dba49d758e665c6f2005527047203fd9e29dda84","user":{"login":"ngageoint","id":7175944,"avatar_url":"https://avatars.githubusercontent.com/u/7175944?v=3","gravatar_id":"","url":"https://api.github.com/users/ngageoint","html_url":"https://github.com/ngageoint","followers_url":"https://api.github.com/users/ngageoint/followers","following_url":"https://api.github.com/users/ngageoint/following{/other_user}","gists_url":"https://api.github.com/users/ngageoint/gists{/gist_id}","starred_url":"https://api.github.com/users/ngageoint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ngageoint/subscriptions","organizations_url":"https://api.github.com/users/ngageoint/orgs","repos_url":"https://api.github.com/users/ngageoint/repos","events_url":"https://api.github.com/users/ngageoint/events{/privacy}","received_events_url":"https://api.github.com/users/ngageoint/received_events","type":"Organization","site_admin":false},"repo":{"id":39220791,"name":"six-library","full_name":"ngageoint/six-library","owner":{"login":"ngageoint","id":7175944,"avatar_url":"https://avatars.githubusercontent.com/u/7175944?v=3","gravatar_id":"","url":"https://api.github.com/users/ngageoint","html_url":"https://github.com/ngageoint","followers_url":"https://api.github.com/users/ngageoint/followers","following_url":"https://api.github.com/users/ngageoint/following{/other_user}","gists_url":"https://api.github.com/users/ngageoint/gists{/gist_id}","starred_url":"https://api.github.com/users/ngageoint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ngageoint/subscriptions","organizations_url":"https://api.github.com/users/ngageoint/orgs","repos_url":"https://api.github.com/users/ngageoint/repos","events_url":"https://api.github.com/users/ngageoint/events{/privacy}","received_events_url":"https://api.github.com/users/ngageoint/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ngageoint/six-library","description":"Sensor Independent XML Library","fork":false,"url":"https://api.github.com/repos/ngageoint/six-library","forks_url":"https://api.github.com/repos/ngageoint/six-library/forks","keys_url":"https://api.github.com/repos/ngageoint/six-library/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ngageoint/six-library/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ngageoint/six-library/teams","hooks_url":"https://api.github.com/repos/ngageoint/six-library/hooks","issue_events_url":"https://api.github.com/repos/ngageoint/six-library/issues/events{/number}","events_url":"https://api.github.com/repos/ngageoint/six-library/events","assignees_url":"https://api.github.com/repos/ngageoint/six-library/assignees{/user}","branches_url":"https://api.github.com/repos/ngageoint/six-library/branches{/branch}","tags_url":"https://api.github.com/repos/ngageoint/six-library/tags","blobs_url":"https://api.github.com/repos/ngageoint/six-library/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ngageoint/six-library/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ngageoint/six-library/git/refs{/sha}","trees_url":"https://api.github.com/repos/ngageoint/six-library/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ngageoint/six-library/statuses/{sha}","languages_url":"https://api.github.com/repos/ngageoint/six-library/languages","stargazers_url":"https://api.github.com/repos/ngageoint/six-library/stargazers","contributors_url":"https://api.github.com/repos/ngageoint/six-library/contributors","subscribers_url":"https://api.github.com/repos/ngageoint/six-library/subscribers","subscription_url":"https://api.github.com/repos/ngageoint/six-library/subscription","commits_url":"https://api.github.com/repos/ngageoint/six-library/commits{/sha}","git_commits_url":"https://api.github.com/repos/ngageoint/six-library/git/commits{/sha}","comments_url":"https://api.github.com/repos/ngageoint/six-library/comments{/number}","issue_comment_url":"https://api.github.com/repos/ngageoint/six-library/issues/comments{/number}","contents_url":"https://api.github.com/repos/ngageoint/six-library/contents/{+path}","compare_url":"https://api.github.com/repos/ngageoint/six-library/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ngageoint/six-library/merges","archive_url":"https://api.github.com/repos/ngageoint/six-library/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ngageoint/six-library/downloads","issues_url":"https://api.github.com/repos/ngageoint/six-library/issues{/number}","pulls_url":"https://api.github.com/repos/ngageoint/six-library/pulls{/number}","milestones_url":"https://api.github.com/repos/ngageoint/six-library/milestones{/number}","notifications_url":"https://api.github.com/repos/ngageoint/six-library/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ngageoint/six-library/labels{/name}","releases_url":"https://api.github.com/repos/ngageoint/six-library/releases{/id}","deployments_url":"https://api.github.com/repos/ngageoint/six-library/deployments","created_at":"2015-07-16T21:13:43Z","updated_at":"2016-11-28T16:29:47Z","pushed_at":"2016-12-22T19:19:39Z","git_url":"git://github.com/ngageoint/six-library.git","ssh_url":"git@github.com:ngageoint/six-library.git","clone_url":"https://github.com/ngageoint/six-library.git","svn_url":"https://github.com/ngageoint/six-library","homepage":"","size":61807,"stargazers_count":13,"watchers_count":13,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":9,"forks":8,"open_issues":9,"watchers":13,"default_branch":"master"}},"base":{"label":"ngageoint:master","ref":"master","sha":"2ef18fee28844d778fa028c69efe570cbefdeec3","user":{"login":"ngageoint","id":7175944,"avatar_url":"https://avatars.githubusercontent.com/u/7175944?v=3","gravatar_id":"","url":"https://api.github.com/users/ngageoint","html_url":"https://github.com/ngageoint","followers_url":"https://api.github.com/users/ngageoint/followers","following_url":"https://api.github.com/users/ngageoint/following{/other_user}","gists_url":"https://api.github.com/users/ngageoint/gists{/gist_id}","starred_url":"https://api.github.com/users/ngageoint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ngageoint/subscriptions","organizations_url":"https://api.github.com/users/ngageoint/orgs","repos_url":"https://api.github.com/users/ngageoint/repos","events_url":"https://api.github.com/users/ngageoint/events{/privacy}","received_events_url":"https://api.github.com/users/ngageoint/received_events","type":"Organization","site_admin":false},"repo":{"id":39220791,"name":"six-library","full_name":"ngageoint/six-library","owner":{"login":"ngageoint","id":7175944,"avatar_url":"https://avatars.githubusercontent.com/u/7175944?v=3","gravatar_id":"","url":"https://api.github.com/users/ngageoint","html_url":"https://github.com/ngageoint","followers_url":"https://api.github.com/users/ngageoint/followers","following_url":"https://api.github.com/users/ngageoint/following{/other_user}","gists_url":"https://api.github.com/users/ngageoint/gists{/gist_id}","starred_url":"https://api.github.com/users/ngageoint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ngageoint/subscriptions","organizations_url":"https://api.github.com/users/ngageoint/orgs","repos_url":"https://api.github.com/users/ngageoint/repos","events_url":"https://api.github.com/users/ngageoint/events{/privacy}","received_events_url":"https://api.github.com/users/ngageoint/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ngageoint/six-library","description":"Sensor Independent XML Library","fork":false,"url":"https://api.github.com/repos/ngageoint/six-library","forks_url":"https://api.github.com/repos/ngageoint/six-library/forks","keys_url":"https://api.github.com/repos/ngageoint/six-library/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ngageoint/six-library/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ngageoint/six-library/teams","hooks_url":"https://api.github.com/repos/ngageoint/six-library/hooks","issue_events_url":"https://api.github.com/repos/ngageoint/six-library/issues/events{/number}","events_url":"https://api.github.com/repos/ngageoint/six-library/events","assignees_url":"https://api.github.com/repos/ngageoint/six-library/assignees{/user}","branches_url":"https://api.github.com/repos/ngageoint/six-library/branches{/branch}","tags_url":"https://api.github.com/repos/ngageoint/six-library/tags","blobs_url":"https://api.github.com/repos/ngageoint/six-library/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ngageoint/six-library/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ngageoint/six-library/git/refs{/sha}","trees_url":"https://api.github.com/repos/ngageoint/six-library/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ngageoint/six-library/statuses/{sha}","languages_url":"https://api.github.com/repos/ngageoint/six-library/languages","stargazers_url":"https://api.github.com/repos/ngageoint/six-library/stargazers","contributors_url":"https://api.github.com/repos/ngageoint/six-library/contributors","subscribers_url":"https://api.github.com/repos/ngageoint/six-library/subscribers","subscription_url":"https://api.github.com/repos/ngageoint/six-library/subscription","commits_url":"https://api.github.com/repos/ngageoint/six-library/commits{/sha}","git_commits_url":"https://api.github.com/repos/ngageoint/six-library/git/commits{/sha}","comments_url":"https://api.github.com/repos/ngageoint/six-library/comments{/number}","issue_comment_url":"https://api.github.com/repos/ngageoint/six-library/issues/comments{/number}","contents_url":"https://api.github.com/repos/ngageoint/six-library/contents/{+path}","compare_url":"https://api.github.com/repos/ngageoint/six-library/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ngageoint/six-library/merges","archive_url":"https://api.github.com/repos/ngageoint/six-library/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ngageoint/six-library/downloads","issues_url":"https://api.github.com/repos/ngageoint/six-library/issues{/number}","pulls_url":"https://api.github.com/repos/ngageoint/six-library/pulls{/number}","milestones_url":"https://api.github.com/repos/ngageoint/six-library/milestones{/number}","notifications_url":"https://api.github.com/repos/ngageoint/six-library/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ngageoint/six-library/labels{/name}","releases_url":"https://api.github.com/repos/ngageoint/six-library/releases{/id}","deployments_url":"https://api.github.com/repos/ngageoint/six-library/deployments","created_at":"2015-07-16T21:13:43Z","updated_at":"2016-11-28T16:29:47Z","pushed_at":"2016-12-22T19:19:39Z","git_url":"git://github.com/ngageoint/six-library.git","ssh_url":"git@github.com:ngageoint/six-library.git","clone_url":"https://github.com/ngageoint/six-library.git","svn_url":"https://github.com/ngageoint/six-library","homepage":"","size":61807,"stargazers_count":13,"watchers_count":13,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":9,"forks":8,"open_issues":9,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ngageoint/six-library/pulls/138"},"html":{"href":"https://github.com/ngageoint/six-library/pull/138"},"issue":{"href":"https://api.github.com/repos/ngageoint/six-library/issues/138"},"comments":{"href":"https://api.github.com/repos/ngageoint/six-library/issues/138/comments"},"review_comments":{"href":"https://api.github.com/repos/ngageoint/six-library/pulls/138/comments"},"review_comment":{"href":"https://api.github.com/repos/ngageoint/six-library/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ngageoint/six-library/pulls/138/commits"},"statuses":{"href":"https://api.github.com/repos/ngageoint/six-library/statuses/dba49d758e665c6f2005527047203fd9e29dda84"}}}}
{"actor":{"display_login":"asylvest"}}