adiwg-mdcodes 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 882a4a567e9fc193221bb5dc67e9b09e25afeb26
4
+ data.tar.gz: f71051a650b8024d366b5c5babd35c70bd9dfca0
5
+ SHA512:
6
+ metadata.gz: 45b87e8aff5350e4a2a8da3aa4f1e328e8a4b6b917565f8f06d42b10071e86d9bea218b847af44c8b28c0715de6624b2acf6c19d57b669d063d44f75673b082c
7
+ data.tar.gz: e2b73efc0bb18a9bcc538ec83e9c82275d3261033080e2806cdae471b55c7437438d3efef7ee99a0392bf0ab1d86de3c411c7c5dc4081e4358a6e92e20497ad4
data/.gitignore ADDED
@@ -0,0 +1,24 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ .idea
7
+ Gemfile.lock
8
+ InstalledFiles
9
+ _yardoc
10
+ coverage
11
+ doc/
12
+ lib/bundler/man
13
+ pkg
14
+ rdoc
15
+ spec/reports
16
+ test/dev.rb
17
+ test/tmp
18
+ test/version_tmp
19
+ tmp
20
+ *.bundle
21
+ *.so
22
+ *.o
23
+ *.a
24
+ mkmf.log
data/.travis.yml ADDED
@@ -0,0 +1,7 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1.0
4
+ - 2.0.0
5
+ - 1.9.3
6
+ - jruby-19mode
7
+ - ruby-head
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in mdCodes.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 stansmith907
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,33 @@
1
+ [![Build Status](https://travis-ci.org/adiwg/mdCodes.svg)](https://travis-ci.org/adiwg/mdCodes)
2
+
3
+ # Mdcodes
4
+
5
+ adiwg-mdcodes provides code lists in JSON formats for loading of mdEditor or other metadata
6
+ editors using adiwg-json-schema. The codes include all ISO 19115-2 and ISO 19115-1 codes plus
7
+ additional codes from NGDC and ADIwg.
8
+
9
+ ## Installation
10
+
11
+ Add this line to your application's Gemfile:
12
+
13
+ gem 'adiwg-mdcodes'
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install adiwg-mdcodes
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Contributing
28
+
29
+ 1. Fork it ( https://github.com/[my-github-username]/mdCodes/fork )
30
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
31
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
32
+ 4. Push to the branch (`git push origin my-new-feature`)
33
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ require 'rake/testtask'
4
+
5
+ Rake::TestTask.new do |t|
6
+ t.libs << 'test'
7
+ t.test_files = FileList['test/tc*.rb']
8
+ t.verbose = true
9
+ end
10
+
11
+ desc "Run tests"
12
+ task :default => :test
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+
5
+ require 'adiwg/mdcodes/version'
6
+
7
+ Gem::Specification.new do |spec|
8
+ spec.name = "adiwg-mdcodes"
9
+ spec.version = ADIWG::Mdcodes::VERSION
10
+ spec.authors = ["stansmith907"]
11
+ spec.email = ["stansmith@usgs.gov"]
12
+ spec.summary = %q{adiwg-mdcodes provides code lists for mdJSON.}
13
+ spec.description = %q{adiwg-mdcodes provides code lists for use in ISO 19139 compliant metadata, especially mdJSON. The codes include all ISO 19115-2 and ISO 19115-1 codes plus additional codes from NGDC and ADIwg.}
14
+ spec.homepage = "https://github.com/adiwg/mdCodes"
15
+ spec.license = "UNLICENSED"
16
+
17
+ spec.files = %x(git ls-files).split($/)
18
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
+ spec.test_files = spec.files.grep(%r{^(tc|test|spec|features)/})
20
+ spec.require_paths = ["lib"]
21
+
22
+ spec.add_development_dependency "bundler", "~> 1.6"
23
+ spec.add_development_dependency "rake", "~>10"
24
+ spec.add_development_dependency "minitest", "~>5"
25
+
26
+ end
@@ -0,0 +1 @@
1
+ require 'adiwg/mdcodes'
@@ -0,0 +1,66 @@
1
+ # Mdcodes - ADIwg codeLists to be used with adiwgJson and mdEditor
2
+ # ... codeLists are maintained in a YAML file 'mdCodes.yml'
3
+ # ... the Mdcodes module has methods to access and return codeLists
4
+
5
+ # History:
6
+ # Stan Smith 2014-11-07 original script
7
+ # Stan Smith 2014-11-07 add methods to return only codeNames
8
+ # Josh Bradley 2014-11-07 moved resources directory outside lib, add getYamlPath
9
+
10
+ # add main directories to load_path
11
+
12
+ require 'yaml'
13
+
14
+ module ADIWG
15
+
16
+ module Mdcodes
17
+ # return the path to yaml file.
18
+ def self.getYamlPath
19
+ File.join(File.dirname(__FILE__),'..','..','resources','mdcodes.yml')
20
+ end
21
+
22
+ # read the yml file into ruby
23
+ def self.getCodeLists
24
+ file = getYamlPath
25
+ return YAML.load_file(file)
26
+ end
27
+
28
+ # return a single code list
29
+ def self.getCodeList(codeList)
30
+ codeLists = getCodeLists
31
+ hCodeList = {}
32
+ hCodeList[codeList] = codeLists[codeList]
33
+ return hCodeList
34
+ end
35
+
36
+ # return only code names
37
+ def self.getCodeNames
38
+ codeLists = getCodeLists
39
+ hCodeNames = {}
40
+ codeLists.each do |key, value|
41
+ aItems = value['items']
42
+ aList = []
43
+ aItems.each do |item|
44
+ aList << item['codeName']
45
+ end
46
+ hCodeNames[key] = aList
47
+ end
48
+ return hCodeNames
49
+ end
50
+
51
+ # return a single code name list
52
+ def self.getCodeName(codeList)
53
+ hCodeList = getCodeList(codeList)
54
+ hCodeNames = {}
55
+ aItems = hCodeList[codeList]['items']
56
+ aList = []
57
+ aItems.each do |item|
58
+ aList << item['codeName']
59
+ end
60
+ hCodeNames[codeList] = aList
61
+ return hCodeNames
62
+ end
63
+
64
+ end
65
+
66
+ end
@@ -0,0 +1,16 @@
1
+ # adiwg mdCodes
2
+
3
+ # version history
4
+
5
+ # 0.1.0 2014-11-05 first release
6
+ # 0.1.1 2014-11-06 added factSheet to scope
7
+ # 0.2.0 2014-11-07 add option to return only codeNames
8
+ # ... moved resources directory outside of lib
9
+
10
+ module ADIWG
11
+
12
+ module Mdcodes
13
+ VERSION = "0.2.0"
14
+ end
15
+
16
+ end
@@ -0,0 +1,433 @@
1
+
2
+ # adiwgJson codelists
3
+ # compiled from ISO 19115-2, 19115-1, NGDC, and ADIwg
4
+
5
+ ---
6
+ associationType:
7
+ isoName: "DS_AssociationTypeCode"
8
+ description: "justification for the correlation of two resources (datasets or projects)"
9
+ items:
10
+ - {code: "001", codeName: crossReference, description: "reference from one resource (dataset or project) to another"}
11
+ - {code: "002", codeName: largerWorkCitation, description: "reference to a master resource (dataset or project) of which this one is a part"}
12
+ - {code: "003", codeName: partOfSeamlessDatabase, description: "part of the same structured set of data held in a computer"}
13
+ - {code: "004", codeName: source, description: "mapping and charting information from which the dataset content originates"}
14
+ - {code: "005", codeName: stereoMate, description: "part of a set of imagery that when used together, provides three-dimensional images"}
15
+ - {code: "006", codeName: isComposedOf, description: "reference to resources (datasets or projects) that are parts of this resource"}
16
+ - {code: "007", codeName: collectiveTitle, description: "common title for a collection of resources. NOTE Title identifies elements of a series collectively, combined with information about what volumes are available at the source cite."}
17
+ - {code: "008", codeName: series, description: "associated through a common heritage such as produced to a common product specification"}
18
+ - {code: "009", codeName: dependency, description: "associated through a dependency"}
19
+ - {code: "010", codeName: revisionOf, description: "resource is a revision of associated resource"}
20
+ - {code: "adiwg001", codeName: projectProduct, description: "products developed as deliverables of a project or program"}
21
+ - {code: "adiwg002", codeName: supplementalResource, description: "supplemental resource"}
22
+
23
+ characterSet:
24
+ isoName: "MD_CharacterSetCode"
25
+ description: "name of the character coding standard used in the resource"
26
+ items:
27
+ - {code: "001", codeName: ucs2, description: "16-bit fixed size Universal Character Set, based on ISO/IEC 10646"}
28
+ - {code: "002", codeName: ucs4, description: "32-bit fixed size Universal Character Set, based on ISO/IEC 10646"}
29
+ - {code: "003", codeName: utf7, description: "7-bit variable size UCS Transfer Format, based on ISO/IEC 10646"}
30
+ - {code: "004", codeName: utf8, description: "8-bit variable size UCS Transfer Format, based on ISO/IEC 10646"}
31
+ - {code: "005", codeName: utf16, description: "16-bit variable size UCS Transfer Format, based on ISO/IEC 10646"}
32
+ - {code: "006", codeName: 8859part1, description: "ISO/IEC 8859-1, Information technology - 8-bit single byte coded graphic character sets - Part 1 : Latin alphabet No.1"}
33
+ - {code: "007", codeName: 8859part2, description: "ISO/IEC 8859-2, Information technology - 8-bit single byte coded graphic character sets - Part 2 : Latin alphabet No.2"}
34
+ - {code: "008", codeName: 8859part3, description: "ISO/IEC 8859-3, Information technology - 8-bit single byte coded graphic character sets - Part 3 : Latin alphabet No.3"}
35
+ - {code: "009", codeName: 8859part4, description: "ISO/IEC 8859-4, Information technology - 8-bit single byte coded graphic character sets - Part 4 : Latin alphabet No.4"}
36
+ - {code: "010", codeName: 8859part5, description: "ISO/IEC 8859-5, Information technology - 8-bit single byte coded graphic character sets - Part 5 : Latin/Cyrillic alphabet"}
37
+ - {code: "011", codeName: 8859part6, description: "ISO/IEC 8859-6, Information technology - 8-bit single byte coded graphic character sets - Part 6 : Latin/Arabic alphabet"}
38
+ - {code: "012", codeName: 8859part7, description: "ISO/IEC 8859-7, Information technology - 8-bit single byte coded graphic character sets - Part 7 : Latin/Greek alphabet"}
39
+ - {code: "013", codeName: 8859part8, description: "ISO/IEC 8859-8, Information technology - 8-bit single byte coded graphic character sets - Part 8 : Latin/Hebrew alphabet"}
40
+ - {code: "014", codeName: 8859part9, description: "ISO/IEC 8859-9, Information technology - 8-bit single byte coded graphic character sets - Part 9 : Latin alphabet No.5"}
41
+ - {code: "015", codeName: 8859part10, description: "ISO/IEC 8859-10, Information technology - 8-bit single byte coded graphic character sets - Part 10 : Latin alphabet No.6"}
42
+ - {code: "016", codeName: 8859part11, description: "ISO/IEC 8859-11, Information technology - 8-bit single byte coded graphic character sets - Part 11 : Latin/Thai alphabet"}
43
+ - {code: "018", codeName: 8859part13, description: "ISO/IEC 8859-13, Information technology - 8-bit single byte coded graphic character sets - Part 13 : Latin alphabet No.7"}
44
+ - {code: "019", codeName: 8859part14, description: "ISO/IEC 8859-14, Information technology - 8-bit single byte coded graphic character sets - Part 14 : Latin alphabet No.8 (Celtic)"}
45
+ - {code: "020", codeName: 8859part15, description: "ISO/IEC 8859-15, Information technology - 8-bit single byte coded graphic character sets - Part 15 : Latin alphabet No.9"}
46
+ - {code: "021", codeName: 8859part16, description: "ISO/IEC 8859-16, Information technology - 8-bit single byte coded graphic character sets - Part 16 : Latin alphabet No.10"}
47
+ - {code: "022", codeName: jis, description: "japanese code set used for electronic transmission"}
48
+ - {code: "023", codeName: shiftJIS, description: "japanese code set used on MS-DOS machines"}
49
+ - {code: "024", codeName: eucJP, description: "japanese code set used on UNIX based machines"}
50
+ - {code: "025", codeName: usAscii, description: "United States ASCII code set (ISO 646 US)"}
51
+ - {code: "026", codeName: ebcdic, description: "IBM mainframe code set"}
52
+ - {code: "027", codeName: ecuKR, description: "Korean code set"}
53
+ - {code: "028", codeName: big5, description: "traditional Chinese code set used in Taiwan, Hong Kong of China and other areas"}
54
+ - {code: "029", codeName: GB2312, description: "simplified Chinese code set"}
55
+
56
+ classification:
57
+ isoName: "MD_ClassificationCode"
58
+ description: "name of the handling restrictions on the dataset"
59
+ items:
60
+ - {code: "001", codeName: unclassified, description: "available for general disclosure"}
61
+ - {code: "002", codeName: restricted, description: "not for general disclosure"}
62
+ - {code: "003", codeName: confidential, description: "available for someone who can be entrusted with information"}
63
+ - {code: "004", codeName: secret, description: "kept or meant to be kept private, unknown, or hidden from all but a select group of people"}
64
+ - {code: "005", codeName: topSecret, description: "of the highest secrecy"}
65
+ - {code: "006", codeName: sensitiveButUnclassified, description: "although unclassified, requires strict controls over its distribution"}
66
+ - {code: "007", codeName: forOfficialUseOnly, description: "unclassified information that is to be used only for official purposes determined by the designating body"}
67
+ - {code: "008", codeName: protected, description: "compromise of the information could cause damage"}
68
+ - {code: "009", codeName: limitedDistribution, description: "dissemination limited by designating body"}
69
+
70
+ dataType:
71
+ isoName: "MD_DatatypeCode"
72
+ description: "datatype of element or entity"
73
+ items:
74
+ - {code: "001", codeName: class, description: "descriptor of a set of objects that share the same attributes, operations, methods, relationships, and behavior"}
75
+ - {code: "002", codeName: codelist, description: "flexible enumeration useful for expressing a long list of values, can be extended"}
76
+ - {code: "003", codeName: enumerations, description: "data type whose instances form a list of named literal values, not extendable"}
77
+ - {code: "004", codeName: codelistElement, description: "permissible value for a codelist or enumeration"}
78
+ - {code: "005", codeName: abstractClass, description: "class that cannot be directly instantiated"}
79
+ - {code: "006", codeName: aggregateClass, description: "class that is composed of classes it is connected to by an aggregate relationship"}
80
+ - {code: "007", codeName: specifiedClass, description: "subclass that may be substituted for its superclass"}
81
+ - {code: "008", codeName: datatypeClass, description: "class with few or no operations whose primary purpose is to hold the abstract state of another class for transmittal, storage, encoding or persistent storage"}
82
+ - {code: "009", codeName: interfaceClass, description: "named set of operations that characterize the behavior of an element"}
83
+ - {code: "010", codeName: unionClass, description: "class describing a selection of one of the specified types"}
84
+ - {code: "011", codeName: metaClass, description: "class whose instances are classes"}
85
+ - {code: "012", codeName: typeClass, description: "class used for specification of a domain of instances (objects), together with the operations applicable to the objects. A type may have attributes and associations"}
86
+ - {code: "013", codeName: characterString, description: "free text field"}
87
+ - {code: "014", codeName: integer, description: "numeric filed"}
88
+ - {code: "015", codeName: association, description: "semantic relationship between two classes that involves connections among their instances"}
89
+ - {code: "016", codeName: typeClass, description: "class used for specification of a domain of instances (objects), together with the operations applicable to the objects. A type may have attributes and associations"}
90
+
91
+ dateType:
92
+ isoName: "CI_DateTypeCode"
93
+ description: "identification of when a given event occurred"
94
+ items:
95
+ - {code: "001", codeName: creation, description: "date identifies when the resource was brought into existence"}
96
+ - {code: "002", codeName: publication, description: "date identifies when the resource was issued"}
97
+ - {code: "003", codeName: revision, description: "date identifies when the resource was examined or re-examined and improved or amended"}
98
+ - {code: "004", codeName: expiry, description: "date identifies when resource expires"}
99
+ - {code: "005", codeName: lastUpdate, description: "date identifies when resource was last updated"}
100
+ - {code: "006", codeName: lastRevision, description: "date identifies when resource was last reviewed"}
101
+ - {code: "007", codeName: nextUpdate, description: "date identifies when resource will be next updated"}
102
+ - {code: "008", codeName: unavailable, description: "date identifies when resource became not available or obtainable"}
103
+ - {code: "009", codeName: inForce, description: "date identifies when resource became in force"}
104
+ - {code: "010", codeName: adopted, description: "date identifies when resource was adopted"}
105
+ - {code: "011", codeName: depreciated, description: "date identifies when resource was deprecated"}
106
+ - {code: "012", codeName: superseded, description: "date identifies when resource was superseded or replaced by another resource"}
107
+ - {code: "013", codeName: validityBegins, description: "time at which the data are considered to become valid. NOTE: There could be quite a delay between creation and validity begins"}
108
+ - {code: "014", codeName: validityExpires, description: "time at which the data are no longer considered to be valid"}
109
+ - {code: "015", codeName: released, description: "the date that the resource shall be released for public access"}
110
+ - {code: "016", codeName: distribution, description: "date identifies when an instance of the resource was distributed"}
111
+
112
+ initiativeType:
113
+ isoName: "DS_InitiativeTypeCode"
114
+ description: "type of initiative under which the resource was produced - the activity that resulted in the resource"
115
+ items:
116
+ - {code: "001", codeName: campaign, description: "series of organized planned actions"}
117
+ - {code: "002", codeName: collection, description: "accumulation of datasets assembled for a specific purpose"}
118
+ - {code: "003", codeName: exercise, description: "specific performance of a function or group of functions"}
119
+ - {code: "004", codeName: experiment, description: "process designed to find if something is effective or valid"}
120
+ - {code: "005", codeName: investigation, description: "search or systematic inquiry"}
121
+ - {code: "006", codeName: mission, description: "specific operation of a data collection system"}
122
+ - {code: "007", codeName: sensor, description: "device or piece of equipment which detects or records"}
123
+ - {code: "008", codeName: operation, description: "action that is part of a series of actions"}
124
+ - {code: "009", codeName: platform, description: "vehicle or other support base that holds a sensor"}
125
+ - {code: "010", codeName: process, description: "method of doing something involving a number of steps"}
126
+ - {code: "011", codeName: program, description: "specific planned activity"}
127
+ - {code: "012", codeName: project, description: "organized undertaking, research, or development"}
128
+ - {code: "013", codeName: study, description: "examination or investigation"}
129
+ - {code: "014", codeName: task, description: "piece of work"}
130
+ - {code: "015", codeName: trial, description: "process of testing to discover or demonstrate something"}
131
+
132
+ keywordType:
133
+ isoName: "MD_KeywordTypeCode"
134
+ description: "methods used to group similar keywords"
135
+ items:
136
+ - {code: "001", codeName: discipline, description: "keyword identifies a branch of instruction or specialized learning"}
137
+ - {code: "002", codeName: place, description: "keyword identifies a location"}
138
+ - {code: "003", codeName: stratum, description: "keyword identifies the layer(s) of any deposited substance"}
139
+ - {code: "004", codeName: temporal, description: "keyword identifies a time period related to the dataset"}
140
+ - {code: "005", codeName: theme, description: "keyword identifies a particular subject or topic"}
141
+ - {code: "006", codeName: dataCentre, description: "keyword identifies a repository or archive that manages and distributes data"}
142
+ - {code: "007", codeName: featureType, description: "keyword identifies a resource containing or about a collection of feature instances with common characteristics"}
143
+ - {code: "008", codeName: instrument, description: "keyword identifies a device used to measure or compare physical properties"}
144
+ - {code: "009", codeName: platform, description: "keyword identifies a structure upon which an instrument is mounted"}
145
+ - {code: "010", codeName: process, description: "keyword identifies a series of actions or natural occurrences"}
146
+ - {code: "011", codeName: project, description: "keyword identifies an endeavour undertaken to create or modify a product or service"}
147
+ - {code: "012", codeName: service, description: "keyword identifies an activity carried out by one party for the benefit of another"}
148
+ - {code: "013", codeName: product, description: "keyword identifies a type of product"}
149
+ - {code: "014", codeName: subTopicCategory, description: "refinement of a topic category for the purpose of geographic data classification"}
150
+ - {code: "015", codeName: taxon, description: "keyword identifies a taxonomy of the resource"}
151
+ - {code: "adiwg001", codeName: region, description: "keyword identifies a known geographic region (such as US Census Area, ecoregion type, etc.)"}
152
+
153
+ maintenanceFrequency:
154
+ isoName: "MD_MaintenanceFrequencyCode"
155
+ description: "frequency with which modifications and deletions are made to the data after it is first produced"
156
+ items:
157
+ - {code: "001", codeName: continual, description: "data is repeatedly and frequently updated"}
158
+ - {code: "002", codeName: daily, description: "data is updated each day"}
159
+ - {code: "003", codeName: weekly, description: "data is updated on a weekly basis"}
160
+ - {code: "004", codeName: fortnightly, description: "data is updated every two weeks"}
161
+ - {code: "005", codeName: monthly, description: "data is updated each month"}
162
+ - {code: "006", codeName: quarterly, description: "data is updated every three months"}
163
+ - {code: "007", codeName: biannually, description: "data is updated twice each year"}
164
+ - {code: "008", codeName: annually, description: "data is updated every year"}
165
+ - {code: "009", codeName: asNeeded, description: "data is updated as deemed necessary"}
166
+ - {code: "010", codeName: irregular, description: "data is updated in intervals that are uneven in duration"}
167
+ - {code: "011", codeName: notPlanned, description: "there are no plans to update the data"}
168
+ - {code: "012", codeName: unknown, description: "frequency of maintenance for the data is not known"}
169
+ - {code: "013", codeName: periodic, description: "resource is updated at regular intervals"}
170
+ - {code: "014", codeName: semimonthly, description: "resource updated twice monthly"}
171
+ - {code: "015", codeName: biennially, description: "resource is updated every 2 years"}
172
+
173
+ mediumFormat:
174
+ isoName: "MD_MediumFormatCode"
175
+ description: "method used to write to the medium"
176
+ items:
177
+ - {code: "001", codeName: cpio, description: "CoPy In / Out (UNIX file format and command)"}
178
+ - {code: "002", codeName: tar, description: "Tape ARchive"}
179
+ - {code: "003", codeName: highSierra, description: "high sierra file system"}
180
+ - {code: "004", codeName: iso9660, description: "information processing – volume and file structure of CD-ROM"}
181
+ - {code: "005", codeName: iso9660RockRidge, description: "rock ridge interchange protocol (UNIX)"}
182
+ - {code: "006", codeName: iso9660AppleHFS, description: "hierarchical file system (Macintosh)"}
183
+ - {code: "007", codeName: udf, description: "universal disk format"}
184
+
185
+ mediumName:
186
+ isoName: "MD_MediumNameCode"
187
+ description: "name of the medium"
188
+ items:
189
+ - {code: "001", codeName: cdRom, description: "read-only optical disk"}
190
+ - {code: "002", codeName: dvd, description: "digital versatile disk"}
191
+ - {code: "003", codeName: dvdRom, description: "digital versatile disk, read only"}
192
+ - {code: "004", codeName: 3halfInchFloppy, description: "3,5 inch magnetic disk"}
193
+ - {code: "005", codeName: 5quarterInchFloppy, description: "5,25 inch magnetic disk"}
194
+ - {code: "006", codeName: 7trackTape, description: "7 track magnetic tape"}
195
+ - {code: "007", codeName: 9trackTape, description: "9 track magnetic tape"}
196
+ - {code: "008", codeName: 3480Cartridge, description: "3480 cartridge tape drive"}
197
+ - {code: "009", codeName: 3490Cartridge, description: "3490 cartridge tape drive"}
198
+ - {code: "010", codeName: 3580Cartridge, description: "3580 cartridge tape drive"}
199
+ - {code: "011", codeName: 4mmCartridge, description: "4 millimetre magnetic tape"}
200
+ - {code: "012", codeName: 8mmCartridge, description: "8 millimetre magnetic tape"}
201
+ - {code: "013", codeName: 1quarterInchCartridgeTape, description: "0,25 inch magnetic tape"}
202
+ - {code: "014", codeName: digitalLinearTape, description: "half inch cartridge streaming tape drive"}
203
+ - {code: "015", codeName: onLine, description: "direct computer linkage"}
204
+ - {code: "016", codeName: satellite, description: "linkage through a satellite communication system"}
205
+ - {code: "017", codeName: telephoneLink, description: "communication through a telephone network"}
206
+ - {code: "018", codeName: hardcopy, description: "pamphlet or leaflet giving descriptive information"}
207
+ - {code: "adiwg001", codeName: bluRay, description: "Blu-ray digital versatile disk"}
208
+ - {code: "adiwg002", codeName: usbHardDrive, description: "USB hard drive disk or solid state"}
209
+ - {code: "adiwg003", codeName: memoryStick, description: "USB memory stick"}
210
+ - {code: "adiwg004", codeName: sdCard, description: "SD memory card"}
211
+ - {code: "adiwg005", codeName: flashCard, description: "compact flash memory card"}
212
+ - {code: "adiwg006", codeName: film, description: "8mm, 16mm, 35mm, 120 and other positive and negative camera film sizes"}
213
+ - {code: "adiwg007", codeName: microfilm, description: "microfilm"}
214
+ - {code: "adiwg008", codeName: internet, description: "internet"}
215
+
216
+ obligation:
217
+ isoName: "MD_ObligationCode"
218
+ description: "obligation of the element or entity (enumeration - cannot be extended)"
219
+ items:
220
+ - {code: "001", codeName: mandatory, description: "element is always required"}
221
+ - {code: "002", codeName: optional, description: "element is not required"}
222
+ - {code: "003", codeName: conditional, description: "element is required when a specific condition is met"}
223
+
224
+ onlineFunction:
225
+ isoName: "CI_OnlineFunctionCode"
226
+ description: "function performed by the resource"
227
+ items:
228
+ - {code: "001", codeName: download, description: "online instructions for transferring data from one storage device or system to another"}
229
+ - {code: "002", codeName: information, description: "online information about the resource"}
230
+ - {code: "003", codeName: offlineAccess, description: "online instructions for requesting the resource from the provider"}
231
+ - {code: "004", codeName: order, description: "online order process for obtaining the resource"}
232
+ - {code: "005", codeName: search, description: "online search interface for seeking out information about the resource"}
233
+ - {code: "006", codeName: completeMetadata, description: "complete metadata provided"}
234
+ - {code: "007", codeName: browseGraphic, description: "browse graphic provided"}
235
+ - {code: "008", codeName: upload, description: "online resource upload capability provided"}
236
+ - {code: "009", codeName: emailService, description: "online email service provided"}
237
+ - {code: "010", codeName: browsing, description: "online browsing provided"}
238
+ - {code: "011", codeName: fileAccess, description: "online file access provided"}
239
+ - {code: "adiwg001", codeName: webApplication, description: "online web application or data forms"}
240
+
241
+ presentationForm:
242
+ isoName: "CI_PresentationFormCode"
243
+ description: "mode in which the data is represented"
244
+ items:
245
+ - {code: "001", codeName: documentDigital, description: "digital representation of a primarily textual item (can contain illustrations also)"}
246
+ - {code: "002", codeName: documentHardcopy, description: "representation of a primarily textual item (can contain illustrations also) on paper, photographic material, or other media"}
247
+ - {code: "003", codeName: imageDigital, description: "likeness of natural or man-made features, objects, and activities acquired through the sensing of visual or any other segment of the electromagnetic spectrum by sensors, such as thermal infrared, and high resolution radar and stored in digital format"}
248
+ - {code: "004", codeName: imageHardcopy, description: "likeness of natural or man-made features, objects, and activities acquired through the sensing of visual or any other segment of the electromagnetic spectrum by sensors, such as thermal infrared, and high resolution radar and reproduced on paper, photographic material, or other media for use directly by the human user"}
249
+ - {code: "005", codeName: mapDigital, description: "map represented in raster or vector form"}
250
+ - {code: "006", codeName: mapHardcopy, description: "map printed on paper, photographic material, or other media for use directly by the human user"}
251
+ - {code: "007", codeName: modelDigital, description: "multi-dimensional digital representation of a feature, process, etc."}
252
+ - {code: "008", codeName: modelHardcopy, description: "3-dimensional, physical model"}
253
+ - {code: "009", codeName: profileDigital, description: "vertical cross-section in digital form"}
254
+ - {code: "010", codeName: profileHardcopy, description: "vertical cross-section printed on paper, etc."}
255
+ - {code: "011", codeName: tableDigital, description: "digital representation of facts or figures systematically displayed, especially in columns"}
256
+ - {code: "012", codeName: tableHardcopy, description: "representation of facts or figures systematically displayed, especially in columns, printed on paper, photographic material, or other media"}
257
+ - {code: "013", codeName: videoDigital, description: "digital video recording"}
258
+ - {code: "014", codeName: videoHardcopy, description: "video recording on film"}
259
+ - {code: "015", codeName: audioDigital, description: "digital audio recording"}
260
+ - {code: "016", codeName: audioHardcopy, description: "audio recording delivered by analog media, such as a magnetic tape"}
261
+ - {code: "017", codeName: multimediaDigitial, description: "information representation using simultaneously various digital modes for text, sound, image"}
262
+ - {code: "018", codeName: multimediaHardcopy, description: "information representation using simultaneously various analog modes for text, sound, image"}
263
+ - {code: "019", codeName: physicalObject, description: "a physical object. EXAMPLE Rock or mineral sample, microscope slide."}
264
+ - {code: "020", codeName: diagramDigital, description: "information represented graphically by charts such as pie chart, bar chart, and other type of diagrams and recorded in digital format"}
265
+ - {code: "021", codeName: diagramHardcopy, description: "information represented graphically by charts such as pie chart, bar chart, and other type of diagrams and printed on paper, photographic material, or other media"}
266
+ - {code: "adiwg001", codeName: webSite, description: "information represented in a series of web pages"}
267
+ - {code: "adiwg002", codeName: webService, description: "information represented as series of HTML end points or remote procedure calls"}
268
+ - {code: "adiwg003", codeName: databaseDigital, description: "information organized in a digital database"}
269
+
270
+ progress:
271
+ isoName: "MD_ProgressCode"
272
+ description: "status of the dataset or progress of a review"
273
+ items:
274
+ - {code: "001", codeName: completed, description: "production of the data has been completed"}
275
+ - {code: "002", codeName: historicalArchive, description: "data has been stored in an offline storage facility"}
276
+ - {code: "003", codeName: obsolete, description: "data is no longer relevant"}
277
+ - {code: "004", codeName: onGoing, description: "data is continually being updated"}
278
+ - {code: "005", codeName: planned, description: "fixed date has been established upon or by which the data will be created or updated"}
279
+ - {code: "006", codeName: required, description: "data needs to be generated or updated"}
280
+ - {code: "007", codeName: underDevelopment, description: "resource (data or project) is currently in the process of being created"}
281
+ - {code: "008", codeName: final, description: "progress concluded and no changes will be accepted"}
282
+ - {code: "009", codeName: pending, description: "committed to, but not yet addressed"}
283
+ - {code: "010", codeName: retired, description: "item is no longer recommended for use. It has not been superseded by another item"}
284
+ - {code: "011", codeName: superseded, description: "replaced by new"}
285
+ - {code: "012", codeName: tentative, description: "provisional changes likely before resource becomes final or complete"}
286
+ - {code: "013", codeName: valid, description: "acceptable under specific conditions"}
287
+ - {code: "014", codeName: accepted, description: "agreed to by sponsor"}
288
+ - {code: "015", codeName: notAccepted, description: "rejected by sponsor"}
289
+ - {code: "016", codeName: withdrawn, description: "removed from consideration"}
290
+ - {code: "017", codeName: proposed, description: "suggested that development needs to be undertaken"}
291
+ - {code: "018", codeName: deprecated, description: "resource superseded and will become obsolete, use only for historical purposes"}
292
+ - {code: "adiwg001", codeName: funded, description: "resource has been approved and secured funding"}
293
+ - {code: "adiwg002", codeName: cancelled, description: "project has been canceled"}
294
+ - {code: "adiwg003", codeName: suspended, description: "project has been placed on hold but is expected to resume at a latter date"}
295
+
296
+ restriction:
297
+ isoName: "MD_RestrictionCode"
298
+ description: "limitation(s) placed upon the access or use of the data"
299
+ items:
300
+ - {code: "001", codeName: copyright, description: "exclusive right to the publication, production, or sale of the rights to a literary, dramatic, musical, or artistic work, or to the use of a commercial print or label, granted by law for a specified period of time to an author, composer, artist, distributor"}
301
+ - {code: "002", codeName: patent, description: "government has granted exclusive right to make, sell, use or license an invention or discovery"}
302
+ - {code: "003", codeName: patentPending, description: "produced or sold information awaiting a patent"}
303
+ - {code: "004", codeName: trademark, description: "a name, symbol, or other device identifying a product, officially registered and legally restricted to the use of the owner or manufacturer"}
304
+ - {code: "005", codeName: license, description: "formal permission to do something"}
305
+ - {code: "006", codeName: intellectualPropertyRights, description: "rights to financial benefit from and control of distribution of non-tangible property that is a result of creativity"}
306
+ - {code: "007", codeName: restricted, description: "withheld from general circulation or disclosure"}
307
+ - {code: "008", codeName: otherRestrictions, description: "limitation not listed"}
308
+ - {code: "009", codeName: unrestricted, description: "no constraints exist"}
309
+ - {code: "010", codeName: licenceUnrestricted, description: "formal permission not required to use the resource"}
310
+ - {code: "011", codeName: licenceEndUser, description: "formal permission required for a person or an entity to use the resource and that may differ from the person that orders or purchases it"}
311
+ - {code: "012", codeName: licenceDistributor, description: "formal permission required for a person or an entity to commercialize or distribute the resource"}
312
+ - {code: "013", codeName: private, description: "protects rights of individual or organisations from observation, intrusion, or attention of others"}
313
+ - {code: "014", codeName: statutory, description: "prescribed by law"}
314
+ - {code: "015", codeName: confidential, description: "not available to the public. NOTE Contains information that could be prejudicial to a commercial, industrial, or national interest."}
315
+ - {code: "016", codeName: sensitiveButUnclassified, description: "although unclassified, requires strict controls over its distribution."}
316
+ - {code: "017", codeName: in-confidence, description: "with trust"}
317
+ - {code: "adiwg001", codeName: threatenedOrEndangered, description: "information could risk threatened or endangered species"}
318
+ - {code: "adiwg002", codeName: traditionalKnowledge, description: "information protected by American Indian or Alaska Native rights or culture"}
319
+ - {code: "adiwg003", codeName: personallyIdentifiableInformation, description: "information that can be used to identify an individual"}
320
+
321
+ role:
322
+ isoName: "CI_RoleCode"
323
+ description: "function performed by the responsible party"
324
+ items:
325
+ - {code: "001", codeName: resourceProvider, description: "party that supplies the resource"}
326
+ - {code: "002", codeName: custodian, description: "party that accepts accountability and responsibility for the data and ensures appropriate care and maintenance of the resource"}
327
+ - {code: "003", codeName: owner, description: "party that owns the resource"}
328
+ - {code: "004", codeName: use, description: "party that uses the resource"}
329
+ - {code: "005", codeName: distributor, description: "party that distributes the resource"}
330
+ - {code: "006", codeName: originator, description: "party that created the resource"}
331
+ - {code: "007", codeName: pointOfContact, description: "party who can be contacted for acquiring knowledge about or acquisition of the resource"}
332
+ - {code: "008", codeName: principalInvestigator, description: "key party responsible for gathering information and conducting research"}
333
+ - {code: "009", codeName: processor, description: "party who has processed the data in a manner such that the resource has been modified"}
334
+ - {code: "010", codeName: publisher, description: "party who published the resource"}
335
+ - {code: "011", codeName: author, description: "party who authored the resource"}
336
+ - {code: "012", codeName: sponsor, description: "party who speaks for the resource"}
337
+ - {code: "013", codeName: coAuthor, description: "party who jointly authors the resource"}
338
+ - {code: "014", codeName: collaborator, description: "party who assists with the generation of the resource other than the principal investigator"}
339
+ - {code: "015", codeName: editor, description: "party who reviewed or modified the resource to improve the content"}
340
+ - {code: "016", codeName: mediator, description: "a class of entity that mediates access to the resource and for whom the resource is intended or useful"}
341
+ - {code: "017", codeName: rightsHolder, description: "party owning or managing rights over the resource"}
342
+ - {code: "018", codeName: contributor, description: "party contributing to the resource"}
343
+ - {code: "019", codeName: funder, description: "party providing monetary support for the resource"}
344
+ - {code: "020", codeName: stakeholder, description: "party who has an interest in the resource or the use of the resource"}
345
+ - {code: "adiwg001", codeName: client, description: "agency or person requesting a project or data collection"}
346
+ - {code: "adiwg002", codeName: logistics, description: "entity that provides logistics support"}
347
+ - {code: "adiwg003", codeName: coPrincipalInvestigator, description: "party who is jointly responsible for gathering information and conducting research"}
348
+
349
+ scope:
350
+ isoName: "MD_ScopeCode"
351
+ description: "class of information to which the referencing entity applies"
352
+ items:
353
+ - {code: "001", codeName: attribute, description: "information applies to the attribute class"}
354
+ - {code: "002", codeName: attributeType, description: "information applies to the characteristic of a feature"}
355
+ - {code: "003", codeName: collectionHardware, description: "information applies to the collection hardware class"}
356
+ - {code: "004", codeName: collectionSession, description: "information applies to the collection session"}
357
+ - {code: "005", codeName: dataset, description: "information applies to the dataset"}
358
+ - {code: "006", codeName: series, description: "information applies to the series"}
359
+ - {code: "007", codeName: nonGeographicDataset, description: "information applies to non-geographic data"}
360
+ - {code: "008", codeName: dimensionGroup, description: "information applies to a dimension group"}
361
+ - {code: "009", codeName: feature, description: "information applies to a feature"}
362
+ - {code: "010", codeName: featureType, description: "information applies to a feature type"}
363
+ - {code: "011", codeName: propertyType, description: "information applies to a property type"}
364
+ - {code: "012", codeName: fieldSession, description: "information applies to a field session"}
365
+ - {code: "013", codeName: software, description: "information applies to a computer program or routine"}
366
+ - {code: "014", codeName: service, description: "information applies to a capability which a service provider entity makes available to a service user entity through a set of interfaces that define a behaviour, such as a use case"}
367
+ - {code: "015", codeName: model, description: "information applies to a copy or imitation of an existing or hypothetical object"}
368
+ - {code: "016", codeName: tile, description: "information applies to a tile, a spatial subset of geographic data"}
369
+ - {code: "017", codeName: metadata, description: "information applies to metadata"}
370
+ - {code: "018", codeName: initiative, description: "information applies to an initiative"}
371
+ - {code: "019", codeName: sample, description: "information applies to a sample"}
372
+ - {code: "020", codeName: document, description: "information applies to a document"}
373
+ - {code: "021", codeName: repository, description: "information applies to a repository"}
374
+ - {code: "022", codeName: aggregate, description: "information applies to an aggregate resource"}
375
+ - {code: "023", codeName: product, description: "metadata describing an ISO 19131 data product specification"}
376
+ - {code: "024", codeName: collection, description: "information applies to an unstructured set"}
377
+ - {code: "025", codeName: coverage, description: "information applies to a coverage"}
378
+ - {code: "026", codeName: application, description: "information resource hosted on a specific set of hardware and accessible over a network"}
379
+ - {code: "adiwg001", codeName: sciencePaper, description: "document based on an experiment or research"}
380
+ - {code: "adiwg002", codeName: userGuide, description: "operating manual for users"}
381
+ - {code: "adiwg003", codeName: dataDictionary, description: "element and entity definitions"}
382
+ - {code: "adiwg004", codeName: website, description: "information applies to a website such as a thematic portal"}
383
+ - {code: "adiwg005", codeName: publication, description: "information applies to a published document"}
384
+ - {code: "adiwg006", codeName: report, description: "information applies to an unpublished document"}
385
+ - {code: "adiwg007", codeName: awardInfo, description: "information applies to a document related to the grant or award for the resource"}
386
+ - {code: "adiwg008", codeName: collectionSite, description: "Locations where data are collected for scientific research"}
387
+ - {code: "adiwg009", codeName: project, description: "high level information that applies to research activity such as project title, location, contacts, timeframe, abstract, etc."}
388
+ - {code: "adiwg010", codeName: factSheet, description: "information applies to fact sheet, pamphlet, flyer, or brochure"}
389
+
390
+ spatialRepresentation:
391
+ isoName: "MD_SpatialRepresentationTypeCode"
392
+ description: "method used to represent geographic information in the dataset"
393
+ items:
394
+ - {code: "001", codeName: vector, description: "vector data is used to represent geographic data"}
395
+ - {code: "002", codeName: grid, description: "grid data is used to represent geographic data"}
396
+ - {code: "003", codeName: textTable, description: "textual or tabular data is used to represent geographic data"}
397
+ - {code: "004", codeName: tin, description: "triangulated irregular network"}
398
+ - {code: "005", codeName: stereoModel, description: "three-dimensional view formed by the intersecting homologous rays of an overlapping pair of images"}
399
+ - {code: "006", codeName: video, description: "scene from a video recording"}
400
+
401
+ telephone:
402
+ isoName: "MD_TelephoneTypeCode"
403
+ description: "type of telephone"
404
+ items:
405
+ - {code: "001", codeName: voice, description: "telephone provides voice service"}
406
+ - {code: "002", codeName: facsimile, description: "telephone provides facsimile service"}
407
+ - {code: "003", codeName: sms, description: "telephone provides sms service"}
408
+
409
+ topicCategory:
410
+ isoName: "MD_TopicCategoryCode"
411
+ description: "high-level geographic data thematic classification to assist in the grouping and search of available geographic data sets. Can be used to group keywords as well. Listed examples are not exhaustive. NOTE It is understood there are overlaps between general categories and the user is encouraged to select the one most appropriate. (enumeration - cannot be extended) "
412
+ items:
413
+ - {code: "001", codeName: farming, description: "rearing of animals and/or cultivation of plants. Examples: agriculture, irrigation, aquaculture, plantations, herding, pests and diseases affecting crops and livestock"}
414
+ - {code: "002", codeName: biota, description: "flora and/or fauna in natural environment. Examples: wildlife, vegetation, biological sciences, ecology, wilderness, sealife, wetlands, habitat."}
415
+ - {code: "003", codeName: boundaries, description: "legal land descriptions. Examples: political and administrative boundaries."}
416
+ - {code: "004", codeName: climatolotyMeteorologyAtmoshphere, description: "processes and phenomena of the atmosphere. Examples: cloud cover, weather, climate, atmospheric conditions, climate change, precipitation"}
417
+ - {code: "005", codeName: economy, description: "economic activities, conditions and employment. Examples: production, labour, revenue, commerce, industry, tourism and ecotourism, forestry, fisheries, commercial or subsistence hunting, exploration and exploitation of resources such as minerals, oil and gas"}
418
+ - {code: "006", codeName: elevation, description: "height above or below sea level. Examples: altitude, bathymetry, digital elevation models, slope, derived products"}
419
+ - {code: "007", codeName: environment, description: "environmental resources, protection and conservation. Examples: environmental pollution, waste storage and treatment, environmental impact assessment, monitoring environmental risk, nature reserves, landscape"}
420
+ - {code: "008", codeName: geoscientificInformation, description: "information pertaining to earth sciences. Examples: geophysical features and processes, geology, minerals, sciences dealing with the composition, structure and origin of the earth’s rocks, risks of earthquakes, volcanic activity, landslides, gravity information, soils, permafrost, ydrogeology, erosion"}
421
+ - {code: "009", codeName: health, description: "health, health services, human ecology, and safety. Examples: disease and illness, factors affecting health, hygiene, substance abuse, mental and physical health, health services"}
422
+ - {code: "010", codeName: imageryBaseMapsEarthCover, description: "base maps. Examples: land cover, topographic maps, imagery, unclassified images, annotations"}
423
+ - {code: "011", codeName: intelligenceMilitary, description: "military bases, structures, activities. Examples: barracks, training grounds, military transportation, information collection"}
424
+ - {code: "012", codeName: inlandWater, description: "inland water features, drainage systems and their characteristics. Examples: rivers and glaciers, salt lakes, water utilization plans, dams, currents, floods, water quality, hydrographic charts"}
425
+ - {code: "013", codeName: location, description: "positional information and services. Examples: addresses, geodetic networks, control points, postal zones and services, place names"}
426
+ - {code: "014", codeName: oceans, description: "features and characteristics of salt water bodies (excluding inland waters). Examples: tides, tidal waves, coastal information, reefs"}
427
+ - {code: "015", codeName: planningCadastre, description: "information used for appropriate actions for future use of the land. Examples: land use maps, zoning maps, cadastral surveys, land ownership"}
428
+ - {code: "016", codeName: society, description: "characteristics of society and cultures. Examples: settlements, anthropology, archaeology, education, traditional beliefs, manners and customs, demographic data, recreational areas and activities, social impact assessments, crime and justice, census information"}
429
+ - {code: "017", codeName: structure, description: "man-made construction. Examples: buildings, museums, churches, factories, housing, monuments, shops, towers"}
430
+ - {code: "018", codeName: transportation, description: "means and aids for conveying persons and/or goods. Examples: roads, airports/airstrips, shipping routes, tunnels, nautical charts, vehicle or vessel location, aeronautical charts, railways"}
431
+ - {code: "019", codeName: utilitiesCommunication, description: "energy, water and waste systems and communications infrastructure and services. Examples: hydroelectricity, geothermal, solar and nuclear sources of energy, water purification and distribution, sewage collection and disposal, electricity and gas distribution, data communication, telecommunication, radio, communication networks"}
432
+ - {code: "020", codeName: extraTerrestrial, description: "region more than 100 km above the surface of the Earth"}
433
+ - {code: "021", codeName: disaster, description: "information related to disasters. Examples: Site of the disaster, evacuation zone, disaster-prevention facility, disaster relief activities."}
@@ -0,0 +1,38 @@
1
+ =begin
2
+ * Description: Test Mdcodes methods
3
+ * Author: Josh Bradley
4
+ * Date: 2014-11-07
5
+ * License: Public Domain
6
+ =end
7
+
8
+ require 'minitest/autorun'
9
+ require File.join(File.dirname(__FILE__),'..','lib', 'adiwg-mdcodes.rb')
10
+
11
+ class TestMdcodes < Minitest::Test
12
+ def test_yaml
13
+ assert_silent {
14
+ yaml = YAML.load_file(ADIWG::Mdcodes.getYamlPath)
15
+ assert_instance_of(Hash, yaml, failure_message = 'Could not parse YAML.')
16
+ }
17
+ end
18
+
19
+ def test_getCodeLists
20
+ assert_instance_of(Hash,ADIWG::Mdcodes.getCodeLists)
21
+ end
22
+
23
+ def test_getCodeList
24
+ yaml = ADIWG::Mdcodes.getCodeLists
25
+ key = yaml.keys[0]
26
+ assert_instance_of(Hash,ADIWG::Mdcodes.getCodeList(key))
27
+ end
28
+
29
+ def test_getCodeNames
30
+ assert_instance_of(Hash,ADIWG::Mdcodes.getCodeNames)
31
+ end
32
+
33
+ def test_getCodeName
34
+ yaml = ADIWG::Mdcodes.getCodeLists
35
+ key = yaml.keys[0]
36
+ assert_instance_of(Hash,ADIWG::Mdcodes.getCodeName(key))
37
+ end
38
+ end
metadata ADDED
@@ -0,0 +1,104 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: adiwg-mdcodes
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.0
5
+ platform: ruby
6
+ authors:
7
+ - stansmith907
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-11-08 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '1.6'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.6'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '10'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '10'
41
+ - !ruby/object:Gem::Dependency
42
+ name: minitest
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: '5'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: '5'
55
+ description: adiwg-mdcodes provides code lists for use in ISO 19139 compliant metadata,
56
+ especially mdJSON. The codes include all ISO 19115-2 and ISO 19115-1 codes plus
57
+ additional codes from NGDC and ADIwg.
58
+ email:
59
+ - stansmith@usgs.gov
60
+ executables: []
61
+ extensions: []
62
+ extra_rdoc_files: []
63
+ files:
64
+ - .gitignore
65
+ - .travis.yml
66
+ - Gemfile
67
+ - LICENSE.txt
68
+ - README.md
69
+ - Rakefile
70
+ - adiwg-mdcodes.gemspec
71
+ - lib/adiwg-mdcodes.rb
72
+ - lib/adiwg/mdcodes.rb
73
+ - lib/adiwg/mdcodes/version.rb
74
+ - resources/mdcodes.yml
75
+ - test/dev.rb
76
+ - test/tc_mdcodes.rb
77
+ homepage: https://github.com/adiwg/mdCodes
78
+ licenses:
79
+ - UNLICENSED
80
+ metadata: {}
81
+ post_install_message:
82
+ rdoc_options: []
83
+ require_paths:
84
+ - lib
85
+ required_ruby_version: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '>='
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ required_rubygems_version: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - '>='
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
95
+ requirements: []
96
+ rubyforge_project:
97
+ rubygems_version: 2.0.3
98
+ signing_key:
99
+ specification_version: 4
100
+ summary: adiwg-mdcodes provides code lists for mdJSON.
101
+ test_files:
102
+ - test/dev.rb
103
+ - test/tc_mdcodes.rb
104
+ has_rdoc: