{"action":"created","comment":{"url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/pulls/comments/34570868","id":34570868,"diff_hunk":"@@ -0,0 +1,442 @@\n+package gov.usgs.cida.gdp.utilities;\n+\n+import gov.usgs.cida.gdp.utilities.exception.OPeNDAPUtilException;\n+import gov.usgs.cida.gdp.utilities.exception.OPeNDAPUtilExceptionID;\n+\n+import java.util.ArrayList;\n+import java.util.Arrays;\n+import java.util.HashMap;\n+import java.util.List;\n+import java.util.Map;\n+\n+import ucar.ma2.Array;\n+import ucar.ma2.Range;\n+import ucar.nc2.Attribute;\n+import ucar.nc2.Dimension;\n+import ucar.nc2.dataset.CoordinateAxis1D;\n+import ucar.nc2.dataset.VariableDS;\n+\n+public class OPeNDAPUtils {\n+    public enum OPeNDAPContentType {\n+        ASCII, BINARY, NONE;\n+\n+        public static OPeNDAPContentType getTypeFromString(String string) {\n+            if (string.equals(\"ASCII\")) {\n+                return ASCII;\n+            }\n+\n+            if (string.equals(\"BINARY\")) {\n+                return BINARY;\n+            }\n+\n+            return NONE;\n+        }\n+\n+        public static String getStringFromType(OPeNDAPContentType type) {\n+            switch (type) {\n+                case ASCII: {\n+                    return \"ASCII\";\n+                }\n+    \n+                case BINARY: {\n+                    return \"BINARY\";\n+                }\n+    \n+                default: {\n+                    return \"NONE\";\n+                }\n+            }\n+        }\n+\n+        public static String getContentTypeString(OPeNDAPContentType type) {\n+            switch (type) {\n+                case ASCII: {\n+                    return \".ascii\";\n+                }\n+    \n+                case BINARY: {\n+                    return \".dods\";\n+                }\n+    \n+                default: {\n+                    return \"\";\n+                }\n+            }\n+        }\n+    }\n+\n+    public static final int RANGE_STRIDE = 1;\n+    public static final String PARAMETER_DECLARITOR = \"?\";","path":"gdp-common-utilities/src/main/java/gov/usgs/cida/gdp/utilities/OPeNDAPUtils.java","position":69,"original_position":69,"commit_id":"67862fee29843af5488e81ebb3eb2e41669e3688","original_commit_id":"c16d42ff1375f377dffe353951e7f7882b7b5cd6","user":{"login":"prusso-sse","id":3075571,"avatar_url":"https://avatars.githubusercontent.com/u/3075571?v=3","gravatar_id":"","url":"https://api.github.com/users/prusso-sse","html_url":"https://github.com/prusso-sse","followers_url":"https://api.github.com/users/prusso-sse/followers","following_url":"https://api.github.com/users/prusso-sse/following{/other_user}","gists_url":"https://api.github.com/users/prusso-sse/gists{/gist_id}","starred_url":"https://api.github.com/users/prusso-sse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prusso-sse/subscriptions","organizations_url":"https://api.github.com/users/prusso-sse/orgs","repos_url":"https://api.github.com/users/prusso-sse/repos","events_url":"https://api.github.com/users/prusso-sse/events{/privacy}","received_events_url":"https://api.github.com/users/prusso-sse/received_events","type":"User","site_admin":false},"body":"ah yes, I knew that looked weird :)","created_at":"2015-07-14T14:05:29Z","updated_at":"2015-07-14T14:05:29Z","html_url":"https://github.com/USGS-CIDA/geo-data-portal/pull/158#discussion_r34570868","pull_request_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/pulls/158","_links":{"self":{"href":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/pulls/comments/34570868"},"html":{"href":"https://github.com/USGS-CIDA/geo-data-portal/pull/158#discussion_r34570868"},"pull_request":{"href":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/pulls/158"}}},"pull_request":{"url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/pulls/158","id":39380287,"html_url":"https://github.com/USGS-CIDA/geo-data-portal/pull/158","diff_url":"https://github.com/USGS-CIDA/geo-data-portal/pull/158.diff","patch_url":"https://github.com/USGS-CIDA/geo-data-portal/pull/158.patch","issue_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/issues/158","number":158,"state":"open","locked":false,"title":"Gdp 958","user":{"login":"prusso-sse","id":3075571,"avatar_url":"https://avatars.githubusercontent.com/u/3075571?v=3","gravatar_id":"","url":"https://api.github.com/users/prusso-sse","html_url":"https://github.com/prusso-sse","followers_url":"https://api.github.com/users/prusso-sse/followers","following_url":"https://api.github.com/users/prusso-sse/following{/other_user}","gists_url":"https://api.github.com/users/prusso-sse/gists{/gist_id}","starred_url":"https://api.github.com/users/prusso-sse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prusso-sse/subscriptions","organizations_url":"https://api.github.com/users/prusso-sse/orgs","repos_url":"https://api.github.com/users/prusso-sse/repos","events_url":"https://api.github.com/users/prusso-sse/events{/privacy}","received_events_url":"https://api.github.com/users/prusso-sse/received_events","type":"User","site_admin":false},"body":"…URI based on netcdf file information.\r\n\r\nThis is a non-official PULL request back to GDP master.  It is to allow a conversation to start based on the changes I made for JIRA GDP-958.  I am not actually \"asking\" for these changes to be merged yet.\r\n\r\nEdit (071015): Can now consider this an official pull request :)\r\nPAR","created_at":"2015-07-07T15:05:40Z","updated_at":"2015-07-14T14:05:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e518c8e9e136fd0c0b86a8e2aefa488df53ddc52","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/pulls/158/commits","review_comments_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/pulls/158/comments","review_comment_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/pulls/comments{/number}","comments_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/issues/158/comments","statuses_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/statuses/67862fee29843af5488e81ebb3eb2e41669e3688","head":{"label":"prusso-sse:GDP-958","ref":"GDP-958","sha":"67862fee29843af5488e81ebb3eb2e41669e3688","user":{"login":"prusso-sse","id":3075571,"avatar_url":"https://avatars.githubusercontent.com/u/3075571?v=3","gravatar_id":"","url":"https://api.github.com/users/prusso-sse","html_url":"https://github.com/prusso-sse","followers_url":"https://api.github.com/users/prusso-sse/followers","following_url":"https://api.github.com/users/prusso-sse/following{/other_user}","gists_url":"https://api.github.com/users/prusso-sse/gists{/gist_id}","starred_url":"https://api.github.com/users/prusso-sse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prusso-sse/subscriptions","organizations_url":"https://api.github.com/users/prusso-sse/orgs","repos_url":"https://api.github.com/users/prusso-sse/repos","events_url":"https://api.github.com/users/prusso-sse/events{/privacy}","received_events_url":"https://api.github.com/users/prusso-sse/received_events","type":"User","site_admin":false},"repo":{"id":21350694,"name":"geo-data-portal","full_name":"prusso-sse/geo-data-portal","owner":{"login":"prusso-sse","id":3075571,"avatar_url":"https://avatars.githubusercontent.com/u/3075571?v=3","gravatar_id":"","url":"https://api.github.com/users/prusso-sse","html_url":"https://github.com/prusso-sse","followers_url":"https://api.github.com/users/prusso-sse/followers","following_url":"https://api.github.com/users/prusso-sse/following{/other_user}","gists_url":"https://api.github.com/users/prusso-sse/gists{/gist_id}","starred_url":"https://api.github.com/users/prusso-sse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prusso-sse/subscriptions","organizations_url":"https://api.github.com/users/prusso-sse/orgs","repos_url":"https://api.github.com/users/prusso-sse/repos","events_url":"https://api.github.com/users/prusso-sse/events{/privacy}","received_events_url":"https://api.github.com/users/prusso-sse/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/prusso-sse/geo-data-portal","description":"","fork":true,"url":"https://api.github.com/repos/prusso-sse/geo-data-portal","forks_url":"https://api.github.com/repos/prusso-sse/geo-data-portal/forks","keys_url":"https://api.github.com/repos/prusso-sse/geo-data-portal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prusso-sse/geo-data-portal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prusso-sse/geo-data-portal/teams","hooks_url":"https://api.github.com/repos/prusso-sse/geo-data-portal/hooks","issue_events_url":"https://api.github.com/repos/prusso-sse/geo-data-portal/issues/events{/number}","events_url":"https://api.github.com/repos/prusso-sse/geo-data-portal/events","assignees_url":"https://api.github.com/repos/prusso-sse/geo-data-portal/assignees{/user}","branches_url":"https://api.github.com/repos/prusso-sse/geo-data-portal/branches{/branch}","tags_url":"https://api.github.com/repos/prusso-sse/geo-data-portal/tags","blobs_url":"https://api.github.com/repos/prusso-sse/geo-data-portal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prusso-sse/geo-data-portal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prusso-sse/geo-data-portal/git/refs{/sha}","trees_url":"https://api.github.com/repos/prusso-sse/geo-data-portal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prusso-sse/geo-data-portal/statuses/{sha}","languages_url":"https://api.github.com/repos/prusso-sse/geo-data-portal/languages","stargazers_url":"https://api.github.com/repos/prusso-sse/geo-data-portal/stargazers","contributors_url":"https://api.github.com/repos/prusso-sse/geo-data-portal/contributors","subscribers_url":"https://api.github.com/repos/prusso-sse/geo-data-portal/subscribers","subscription_url":"https://api.github.com/repos/prusso-sse/geo-data-portal/subscription","commits_url":"https://api.github.com/repos/prusso-sse/geo-data-portal/commits{/sha}","git_commits_url":"https://api.github.com/repos/prusso-sse/geo-data-portal/git/commits{/sha}","comments_url":"https://api.github.com/repos/prusso-sse/geo-data-portal/comments{/number}","issue_comment_url":"https://api.github.com/repos/prusso-sse/geo-data-portal/issues/comments{/number}","contents_url":"https://api.github.com/repos/prusso-sse/geo-data-portal/contents/{+path}","compare_url":"https://api.github.com/repos/prusso-sse/geo-data-portal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prusso-sse/geo-data-portal/merges","archive_url":"https://api.github.com/repos/prusso-sse/geo-data-portal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prusso-sse/geo-data-portal/downloads","issues_url":"https://api.github.com/repos/prusso-sse/geo-data-portal/issues{/number}","pulls_url":"https://api.github.com/repos/prusso-sse/geo-data-portal/pulls{/number}","milestones_url":"https://api.github.com/repos/prusso-sse/geo-data-portal/milestones{/number}","notifications_url":"https://api.github.com/repos/prusso-sse/geo-data-portal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prusso-sse/geo-data-portal/labels{/name}","releases_url":"https://api.github.com/repos/prusso-sse/geo-data-portal/releases{/id}","created_at":"2014-06-30T12:44:53Z","updated_at":"2014-06-20T15:58:29Z","pushed_at":"2015-07-14T14:01:48Z","git_url":"git://github.com/prusso-sse/geo-data-portal.git","ssh_url":"git@github.com:prusso-sse/geo-data-portal.git","clone_url":"https://github.com/prusso-sse/geo-data-portal.git","svn_url":"https://github.com/prusso-sse/geo-data-portal","homepage":null,"size":173550,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"USGS-CIDA:master","ref":"master","sha":"6426afac350b46eb319540cb4042c0ea20a88ca1","user":{"login":"USGS-CIDA","id":918179,"avatar_url":"https://avatars.githubusercontent.com/u/918179?v=3","gravatar_id":"","url":"https://api.github.com/users/USGS-CIDA","html_url":"https://github.com/USGS-CIDA","followers_url":"https://api.github.com/users/USGS-CIDA/followers","following_url":"https://api.github.com/users/USGS-CIDA/following{/other_user}","gists_url":"https://api.github.com/users/USGS-CIDA/gists{/gist_id}","starred_url":"https://api.github.com/users/USGS-CIDA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/USGS-CIDA/subscriptions","organizations_url":"https://api.github.com/users/USGS-CIDA/orgs","repos_url":"https://api.github.com/users/USGS-CIDA/repos","events_url":"https://api.github.com/users/USGS-CIDA/events{/privacy}","received_events_url":"https://api.github.com/users/USGS-CIDA/received_events","type":"Organization","site_admin":false},"repo":{"id":11799031,"name":"geo-data-portal","full_name":"USGS-CIDA/geo-data-portal","owner":{"login":"USGS-CIDA","id":918179,"avatar_url":"https://avatars.githubusercontent.com/u/918179?v=3","gravatar_id":"","url":"https://api.github.com/users/USGS-CIDA","html_url":"https://github.com/USGS-CIDA","followers_url":"https://api.github.com/users/USGS-CIDA/followers","following_url":"https://api.github.com/users/USGS-CIDA/following{/other_user}","gists_url":"https://api.github.com/users/USGS-CIDA/gists{/gist_id}","starred_url":"https://api.github.com/users/USGS-CIDA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/USGS-CIDA/subscriptions","organizations_url":"https://api.github.com/users/USGS-CIDA/orgs","repos_url":"https://api.github.com/users/USGS-CIDA/repos","events_url":"https://api.github.com/users/USGS-CIDA/events{/privacy}","received_events_url":"https://api.github.com/users/USGS-CIDA/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/USGS-CIDA/geo-data-portal","description":"","fork":false,"url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal","forks_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/forks","keys_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/teams","hooks_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/hooks","issue_events_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/issues/events{/number}","events_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/events","assignees_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/assignees{/user}","branches_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/branches{/branch}","tags_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/tags","blobs_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/git/refs{/sha}","trees_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/statuses/{sha}","languages_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/languages","stargazers_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/stargazers","contributors_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/contributors","subscribers_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/subscribers","subscription_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/subscription","commits_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/commits{/sha}","git_commits_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/git/commits{/sha}","comments_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/comments{/number}","issue_comment_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/issues/comments{/number}","contents_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/contents/{+path}","compare_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/merges","archive_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/downloads","issues_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/issues{/number}","pulls_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/pulls{/number}","milestones_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/milestones{/number}","notifications_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/labels{/name}","releases_url":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/releases{/id}","created_at":"2013-07-31T19:17:40Z","updated_at":"2015-03-11T18:33:03Z","pushed_at":"2015-07-14T14:01:49Z","git_url":"git://github.com/USGS-CIDA/geo-data-portal.git","ssh_url":"git@github.com:USGS-CIDA/geo-data-portal.git","clone_url":"https://github.com/USGS-CIDA/geo-data-portal.git","svn_url":"https://github.com/USGS-CIDA/geo-data-portal","homepage":null,"size":178543,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":4,"forks":14,"open_issues":4,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/pulls/158"},"html":{"href":"https://github.com/USGS-CIDA/geo-data-portal/pull/158"},"issue":{"href":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/issues/158"},"comments":{"href":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/issues/158/comments"},"review_comments":{"href":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/pulls/158/comments"},"review_comment":{"href":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/pulls/158/commits"},"statuses":{"href":"https://api.github.com/repos/USGS-CIDA/geo-data-portal/statuses/67862fee29843af5488e81ebb3eb2e41669e3688"}}}}