Skip to content

Commit

Permalink
- allow non-ISO code names to be rendered in XML
Browse files Browse the repository at this point in the history
  • Loading branch information
stansmith907 committed Oct 15, 2014
1 parent e37df48 commit 59177c4
Show file tree
Hide file tree
Showing 18 changed files with 38 additions and 34 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@ rdoc
spec/reports
test/tmp
test/version_tmp
test/adiwgJson_full_test_example.json
test/adiwgJson_min_test_example.json
test/dev.rb
tmp
*.bundle
*.so
*.o
*.a
mkmf.log

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# from http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml
# History:
# Stan Smith 2013-10-21 original script
# Stan Smith 2014-10-15 allow non-ISO codesNames to be rendered

class DS_AssociationTypeCode
def initialize(xml)
Expand All @@ -17,8 +18,7 @@ def writeXML(codeName)
when 'source' then codeID = '004'
when 'stereoMate' then codeID = '005'
else
codeName = 'INVALID ASSOCIATION TYPE CODE'
codeID = '999'
codeID = 'non-ISO codeName'
end

# write xml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# from http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml
# History:
# Stan Smith 2013-08-09 original script
# Stan Smith 2014-10-15 allow non-ISO codesNames to be rendered

class MD_CharacterSetCode
def initialize(xml)
Expand Down Expand Up @@ -40,8 +41,7 @@ def writeXML(codeName)
when 'big5' then codeID = '028'
when 'GB2312' then codeID = '029'
else
codeName = 'INVALID CHARACTER SET'
codeID = '999'
codeID = 'non-ISO codeName'
end

# write xml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# from http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml
# History:
# Stan Smith 2013-10-21 original script
# Stan Smith 2014-10-15 allow non-ISO codesNames to be rendered

class MD_ClassificationCode
def initialize(xml)
Expand All @@ -17,8 +18,7 @@ def writeXML(codeName)
when 'secret' then codeID = '004'
when 'topSecret' then codeID = '005'
else
codeName = 'INVALID CLASSIFICATION CODE'
codeID = '999'
codeID = 'non-ISO codeName'
end

# write xml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# from http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml
# History:
# Stan Smith 2013-10-21 original script
# Stan Smith 2014-10-15 allow non-ISO codesNames to be rendered

class MD_DatatypeCode
def initialize(xml)
Expand All @@ -27,8 +28,7 @@ def writeXML(codeName)
when 'integer' then codeID = '014'
when 'association' then codeID = '015'
else
codeName = 'INVALID DATATYPE'
codeID = '999'
codeID = 'non-ISO codeName'
end

# write xml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# from http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml
# History:
# Stan Smith 2013-08-09 original script
# Stan Smith 2014-10-15 allow non-ISO codesNames to be rendered

class CI_DateTypeCode

Expand All @@ -16,8 +17,7 @@ def writeXML(codeName)
when 'publication' then codeID = '002'
when 'revision' then codeID = '003'
else
codeName = 'INVALID DATE TYPE'
codeID = '999'
codeID = 'non-ISO codeName'
end

# write xml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# from http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml
# History:
# Stan Smith 2014-05-21 original script
# Stan Smith 2014-10-15 allow non-ISO codesNames to be rendered

class DS_InitiativeTypeCode
def initialize(xml)
Expand All @@ -17,8 +18,7 @@ def writeXML(codeName)
when 'experiment' then codeID = '004'
when 'investigation' then codeID = '005'
else
codeName = 'INVALID CLASSIFICATION CODE'
codeID = '999'
codeID = 'non-ISO codeName'
end

# write xml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# from http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml
# History:
# Stan Smith 2013-09-18 original script
# Stan Smith 2014-10-15 allow non-ISO codesNames to be rendered

class MD_KeywordTypeCode

Expand All @@ -20,8 +21,7 @@ def writeXML(codeName)
when 'taxon' then codeID = '006'
when 'instrument' then codeID = 'ADIwg-001'
else
codeName = 'INVALID KEYWORD TYPE'
codeID = '999'
codeID = 'non-ISO codeName'
end

# write xml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# from http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml
# History:
# Stan Smith 2013-10-21 original script
# Stan Smith 2014-10-15 allow non-ISO codesNames to be rendered

class MD_MaintenanceFrequencyCode
def initialize(xml)
Expand All @@ -24,8 +25,7 @@ def writeXML(codeName)
when 'notPlanned' then codeID = '011'
when 'unknown' then codeID = '012'
else
codeName = 'INVALID MAINTENANCE FREQUENCY'
codeID = '999'
codeID = 'non-ISO codeName'
end

# write xml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# from http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml
# History:
# Stan Smith 2013-09-24 original script
# Stan Smith 2014-10-15 allow non-ISO codesNames to be rendered

class MD_MediumFormatCode

Expand All @@ -19,8 +20,7 @@ def writeXML(codeName)
when 'iso9660RockRidge' then codeID = '005'
when 'iso9660AppleHFS' then codeID = '006'
else
codeName = 'INVALID MEDIUM FORMAT TYPE'
codeID = '999'
codeID = 'non-ISO codeName'
end

# write xml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# from http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml
# History:
# Stan Smith 2013-09-24 original script
# Stan Smith 2014-10-15 allow non-ISO codesNames to be rendered

class MD_MediumNameCode

Expand Down Expand Up @@ -31,8 +32,7 @@ def writeXML(codeName)
when 'telephoneLink' then codeID = '017'
when 'hardcopy' then codeID = '018'
else
codeName = 'INVALID MEDIUM NAME'
codeID = '999'
codeID = 'non-ISO codeName'
end

# write xml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# from http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml
# History:
# Stan Smith 2013-09-26 original script
# Stan Smith 2014-10-15 allow non-ISO codesNames to be rendered

class CI_OnLineFunctionCode

Expand All @@ -18,8 +19,7 @@ def writeXML(codeName)
when 'order' then codeID = '004'
when 'search' then codeID = '005'
else
codeName = 'INVALID ONLINE FUNCTION CODE'
codeID = '999'
codeID = 'non-ISO codeName'
end

# write xml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# from http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml
# History:
# Stan Smith 2013-11-20 original script
# Stan Smith 2014-10-15 allow non-ISO codesNames to be rendered

class CI_PresentationFormCode
def initialize(xml)
Expand All @@ -26,8 +27,7 @@ def writeXML(codeName)
when 'videoDigital' then codeID = '013'
when 'videoHardcopy' then codeID = '014'
else
codeName = 'INVALID PRESENTATION FORM SET'
codeID = '999'
codeID = 'non-ISO codeName'
end

# write xml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# from http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml
# History:
# Stan Smith 2013-08-26 original script
# Stan Smith 2014-10-15 allow non-ISO codesNames to be rendered

class MD_ProgressCode
def initialize(xml)
Expand All @@ -20,8 +21,7 @@ def writeXML(codeName)
when 'required' then codeID = '006'
when 'underDevelopment' then codeID = '007'
else
codeName = 'INVALID ROLE CODE'
codeID = '999'
codeID = 'non-ISO codeName'
end

# write xml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# from http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml
# History:
# Stan Smith 2013-10-21 original script
# Stan Smith 2014-10-15 allow non-ISO codesNames to be rendered

class MD_RestrictionCode
def initialize(xml)
Expand All @@ -20,8 +21,7 @@ def writeXML(codeName)
when 'restricted' then codeID = '007'
when 'otherRestrictions' then codeID = '008'
else
codeName = 'INVALID RESTRICTION'
codeID = '999'
codeID = 'non-ISO codeName'
end

# write xml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# from http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml
# History:
# Stan Smith 2013-08-09 original script
# Stan Smith 2014-10-15 allow non-ISO codesNames to be rendered

class CI_RoleCode
def initialize(xml)
Expand All @@ -24,8 +25,7 @@ def writeXML(codeName)
when 'publisher' then codeID = '010'
when 'author' then codeID = '011'
else
codeName = 'INVALID ROLE CODE'
codeID = '999'
codeID = 'non-ISO codeName'
end

# write xml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# from http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml
# History:
# Stan Smith 2013-08-09 original script
# Stan Smith 2014-10-15 allow non-ISO codesNames to be rendered

class MD_ScopeCode
def initialize(xml)
Expand All @@ -28,8 +29,7 @@ def writeXML(codeName)
when 'model' then codeID = '015'
when 'tile' then codeID = '016'
else
codeName = 'INVALID SCOPE CODE'
codeID = '999'
codeID = 'non-ISO codeName'
end

# write xml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# from http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml
# History:
# Stan Smith 2013-10-21 original script
# Stan Smith 2014-10-15 allow non-ISO codesNames to be rendered

class MD_SpatialRepresentationTypeCode
def initialize(xml)
Expand All @@ -18,8 +19,7 @@ def writeXML(codeName)
when 'stereoModel' then codeID = '005'
when 'video' then codeID = '006'
else
codeName = 'INVALID SPATIAL REPRESENTATION TYPE'
codeID = '999'
codeID = 'non-ISO codeName'
end

# write xml
Expand Down

0 comments on commit 59177c4

Please sign in to comment.