Skip to content

Commit

Permalink
Merge branch 'releases/2-19-0' into feature/acquisition
Browse files Browse the repository at this point in the history
  • Loading branch information
jwaspin committed Jul 3, 2024
2 parents a9fef38 + 87ce034 commit 391a184
Show file tree
Hide file tree
Showing 12 changed files with 37 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@ def writeXML(hPeriod)
# if empty add indeterminatePosition="unknown"
unless hPeriod[:startDateTime].empty?
hDateTime = hPeriod[:startDateTime]
dateTime = hDateTime[:dateTime]
timeResolution = hDateTime[:dateResolution]
dateStr = AdiwgDateTimeFun.stringDateTimeFromDateTime(dateTime, timeResolution)
dateStr = AdiwgDateTimeFun.stringDateTimeFromDateObject(hDateTime)
@xml.tag!('gml:beginPosition', dateStr)
end
if hPeriod[:startDateTime].empty?
Expand All @@ -79,9 +77,7 @@ def writeXML(hPeriod)
# if empty add indeterminatePosition="unknown"
unless hPeriod[:endDateTime].empty?
hDateTime = hPeriod[:endDateTime]
dateTime = hDateTime[:dateTime]
timeResolution = hDateTime[:dateResolution]
dateStr = AdiwgDateTimeFun.stringDateTimeFromDateTime(dateTime, timeResolution)
dateStr = AdiwgDateTimeFun.stringDateTimeFromDateObject(hDateTime)
@xml.tag!('gml:endPosition', dateStr)
end
if hPeriod[:endDateTime].empty?
Expand Down
3 changes: 2 additions & 1 deletion test/helpers/mdJson_hash_functions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ def build_dataQuality
reportReference: build_citation('standalone quality report 1'),
abstract: "standalone quality report 1"
}

# NOTE: This object should be in the file mdJson_hash_objects.rb so at some point it should be moved
# refer to other build_ functions for examples and references on how build_dataQuality should be structured
hDataQuality[:report] = [
{
type: 'DQ_AbsoluteExternalPositionalAccuracy',
Expand Down
2 changes: 1 addition & 1 deletion test/writers/iso19115-3/tc_19115_3_temporalExtent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class TestWriter191151TemporalExtent < TestWriter191151Parent
# build mdJson test file in hash
mdHash = TDClass.base

hTimeP = TDClass.build_timePeriod('TPID001',nil,'2017-05-02','2018-05-02T08:46')
hTimeP = TDClass.build_timePeriod('TPID001',nil,'2017-05-02T00:00','2018-05-02T08:46')
hTimeI = TDClass.build_timeInstant('TIID001',nil,'2018-05-02T08:48:00-00:09')
mdHash[:metadata][:resourceInfo][:extent][0][:temporalExtent] = []
mdHash[:metadata][:resourceInfo][:extent][0][:temporalExtent] << { timePeriod: hTimeP }
Expand Down
2 changes: 1 addition & 1 deletion test/writers/iso19115-3/tc_19115_3_timePeriod.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class TestWriter191151TimePeriod < TestWriter191151Parent
# build mdJson test file in hash
mdHash = TDClass.base

hTimeP = TDClass.build_timePeriod('TPID001',nil,'2017-05-02','2018-05-02T08:46')
hTimeP = TDClass.build_timePeriod('TPID001',nil,'2017-05-02T00:00','2018-05-02T08:46')
mdHash[:metadata][:resourceInfo][:extent][0][:temporalExtent] = []
mdHash[:metadata][:resourceInfo][:extent][0][:temporalExtent] << { timePeriod: hTimeP }
mdHash[:metadata][:resourceInfo][:extent][0].delete(:geographicExtent)
Expand Down
20 changes: 10 additions & 10 deletions test/writers/iso19115-3/testData/19115_3_dataIdentification.xml
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@
<gml:description>resource time period</gml:description>
<gml:identifier codeSpace=""/>
<gml:name/>
<gml:beginPosition>2017-12-01T00:00:00</gml:beginPosition>
<gml:beginPosition>2017-12-01</gml:beginPosition>
<gml:endPosition indeterminatePosition="unknown"/>
</gml:TimePeriod>
</gex:extent>
Expand Down Expand Up @@ -607,7 +607,7 @@
<gml:description>resource time period</gml:description>
<gml:identifier codeSpace=""/>
<gml:name/>
<gml:beginPosition>2017-12-01T00:00:00</gml:beginPosition>
<gml:beginPosition>2017-12-01</gml:beginPosition>
<gml:endPosition indeterminatePosition="unknown"/>
</gml:TimePeriod>
</gex:extent>
Expand Down Expand Up @@ -765,8 +765,8 @@
<gml:identifier codeSpace="">time period identifier</gml:identifier>
<gml:name>period name one</gml:name>
<gml:name>period name two</gml:name>
<gml:beginPosition>2018-05-02T00:00:00</gml:beginPosition>
<gml:endPosition>2016-12-31T00:00:00</gml:endPosition>
<gml:beginPosition>2018-05-02</gml:beginPosition>
<gml:endPosition>2016-12-31</gml:endPosition>
<gml:timeInterval unit="year">1.1</gml:timeInterval>
</gml:TimePeriod>
</mri:usageDateTime>
Expand Down Expand Up @@ -1273,7 +1273,7 @@
<gml:description>resource time period</gml:description>
<gml:identifier codeSpace=""/>
<gml:name/>
<gml:beginPosition>2017-12-01T00:00:00</gml:beginPosition>
<gml:beginPosition>2017-12-01</gml:beginPosition>
<gml:endPosition indeterminatePosition="unknown"/>
</gml:TimePeriod>
</gex:extent>
Expand Down Expand Up @@ -1615,8 +1615,8 @@
<gml:identifier codeSpace="">time period identifier</gml:identifier>
<gml:name>period name one</gml:name>
<gml:name>period name two</gml:name>
<gml:beginPosition>2018-05-02T00:00:00</gml:beginPosition>
<gml:endPosition>2016-12-31T00:00:00</gml:endPosition>
<gml:beginPosition>2018-05-02</gml:beginPosition>
<gml:endPosition>2016-12-31</gml:endPosition>
<gml:timeInterval unit="year">1.1</gml:timeInterval>
</gml:TimePeriod>
</mri:usageDateTime>
Expand Down Expand Up @@ -1709,8 +1709,8 @@
<gml:identifier codeSpace="">time period identifier</gml:identifier>
<gml:name>period name one</gml:name>
<gml:name>period name two</gml:name>
<gml:beginPosition>2018-05-02T00:00:00</gml:beginPosition>
<gml:endPosition>2016-12-31T00:00:00</gml:endPosition>
<gml:beginPosition>2018-05-02</gml:beginPosition>
<gml:endPosition>2016-12-31</gml:endPosition>
<gml:timeInterval unit="year">1.1</gml:timeInterval>
</gml:TimePeriod>
</mri:usageDateTime>
Expand Down Expand Up @@ -2274,7 +2274,7 @@
<gml:description>resource time period</gml:description>
<gml:identifier codeSpace=""/>
<gml:name/>
<gml:beginPosition>2017-12-01T00:00:00</gml:beginPosition>
<gml:beginPosition>2017-12-01</gml:beginPosition>
<gml:endPosition indeterminatePosition="unknown"/>
</gml:TimePeriod>
</gex:extent>
Expand Down
2 changes: 1 addition & 1 deletion test/writers/iso19115-3/testData/19115_3_extent.xml
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
<gml:name>period name one</gml:name>
<gml:name>period name two</gml:name>
<gml:beginPosition>2018-04-20T16:46</gml:beginPosition>
<gml:endPosition>2016-12-31T00:00:00</gml:endPosition>
<gml:endPosition>2016-12-31</gml:endPosition>
<gml:timeInterval unit="year">1.1</gml:timeInterval>
</gml:TimePeriod>
</gex:extent>
Expand Down
8 changes: 4 additions & 4 deletions test/writers/iso19115-3/testData/19115_3_leProcessStep.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
<gml:identifier codeSpace="">time period identifier</gml:identifier>
<gml:name>period name one</gml:name>
<gml:name>period name two</gml:name>
<gml:beginPosition>2018-06-22T00:00:00</gml:beginPosition>
<gml:endPosition>2016-12-31T00:00:00</gml:endPosition>
<gml:beginPosition>2018-06-22</gml:beginPosition>
<gml:endPosition>2016-12-31</gml:endPosition>
<gml:timeInterval unit="year">1.1</gml:timeInterval>
</gml:TimePeriod>
</mrl:stepDateTime>
Expand Down Expand Up @@ -1018,8 +1018,8 @@
<gml:identifier codeSpace="">time period identifier</gml:identifier>
<gml:name>period name one</gml:name>
<gml:name>period name two</gml:name>
<gml:beginPosition>2018-06-22T00:00:00</gml:beginPosition>
<gml:endPosition>2016-12-31T00:00:00</gml:endPosition>
<gml:beginPosition>2018-06-22</gml:beginPosition>
<gml:endPosition>2016-12-31</gml:endPosition>
<gml:timeInterval unit="year">1.1</gml:timeInterval>
</gml:TimePeriod>
</mrl:stepDateTime>
Expand Down
12 changes: 6 additions & 6 deletions test/writers/iso19115-3/testData/19115_3_liProcessStep.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
<gml:identifier codeSpace="">time period identifier</gml:identifier>
<gml:name>period name one</gml:name>
<gml:name>period name two</gml:name>
<gml:beginPosition>2018-06-22T00:00:00</gml:beginPosition>
<gml:endPosition>2016-12-31T00:00:00</gml:endPosition>
<gml:beginPosition>2018-06-22</gml:beginPosition>
<gml:endPosition>2016-12-31</gml:endPosition>
<gml:timeInterval unit="year">1.1</gml:timeInterval>
</gml:TimePeriod>
</mrl:stepDateTime>
Expand Down Expand Up @@ -231,8 +231,8 @@
<gml:identifier codeSpace="">time period identifier</gml:identifier>
<gml:name>period name one</gml:name>
<gml:name>period name two</gml:name>
<gml:beginPosition>2018-06-22T00:00:00</gml:beginPosition>
<gml:endPosition>2016-12-31T00:00:00</gml:endPosition>
<gml:beginPosition>2018-06-22</gml:beginPosition>
<gml:endPosition>2016-12-31</gml:endPosition>
<gml:timeInterval unit="year">1.1</gml:timeInterval>
</gml:TimePeriod>
</mrl:stepDateTime>
Expand Down Expand Up @@ -583,8 +583,8 @@
<gml:identifier codeSpace="">time period identifier</gml:identifier>
<gml:name>period name one</gml:name>
<gml:name>period name two</gml:name>
<gml:beginPosition>2018-06-22T00:00:00</gml:beginPosition>
<gml:endPosition>2016-12-31T00:00:00</gml:endPosition>
<gml:beginPosition>2018-06-22</gml:beginPosition>
<gml:endPosition>2016-12-31</gml:endPosition>
<gml:timeInterval unit="year">1.1</gml:timeInterval>
</gml:TimePeriod>
</mrl:stepDateTime>
Expand Down
2 changes: 1 addition & 1 deletion test/writers/iso19115-3/testData/19115_3_mdMetadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@
<gml:description>resource time period</gml:description>
<gml:identifier codeSpace=""/>
<gml:name/>
<gml:beginPosition>2017-12-01T00:00:00</gml:beginPosition>
<gml:beginPosition>2017-12-01</gml:beginPosition>
<gml:endPosition indeterminatePosition="unknown"/>
</gml:TimePeriod>
</gex:extent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<gml:identifier codeSpace="">time period identifier</gml:identifier>
<gml:name>period name one</gml:name>
<gml:name>period name two</gml:name>
<gml:beginPosition>2017-05-02T00:00:00</gml:beginPosition>
<gml:beginPosition>2017-05-02T00:00</gml:beginPosition>
<gml:endPosition>2018-05-02T08:46</gml:endPosition>
<gml:timeInterval unit="year">1.1</gml:timeInterval>
</gml:TimePeriod>
Expand Down
4 changes: 2 additions & 2 deletions test/writers/iso19115-3/testData/19115_3_timePeriod.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<gml:identifier codeSpace="">time period identifier</gml:identifier>
<gml:name>period name one</gml:name>
<gml:name>period name two</gml:name>
<gml:beginPosition>2017-05-02T00:00:00</gml:beginPosition>
<gml:beginPosition>2017-05-02T00:00</gml:beginPosition>
<gml:endPosition>2018-05-02T08:46</gml:endPosition>
<gml:timeInterval unit="year">1.1</gml:timeInterval>
</gml:TimePeriod>
Expand All @@ -56,7 +56,7 @@
<gml:description/>
<gml:identifier codeSpace=""/>
<gml:name/>
<gml:beginPosition>2017-05-02T00:00:00</gml:beginPosition>
<gml:beginPosition>2017-05-02T00:00</gml:beginPosition>
<gml:endPosition indeterminatePosition="unknown"/>
<gml:duration>P1Y2M3DT4H5M6S</gml:duration>
</gml:TimePeriod>
Expand Down
12 changes: 6 additions & 6 deletions test/writers/iso19115-3/testData/19115_3_usage.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
<gml:identifier codeSpace="">time period identifier</gml:identifier>
<gml:name>period name one</gml:name>
<gml:name>period name two</gml:name>
<gml:beginPosition>2018-05-02T00:00:00</gml:beginPosition>
<gml:endPosition>2016-12-31T00:00:00</gml:endPosition>
<gml:beginPosition>2018-05-02</gml:beginPosition>
<gml:endPosition>2016-12-31</gml:endPosition>
<gml:timeInterval unit="year">1.1</gml:timeInterval>
</gml:TimePeriod>
</mri:usageDateTime>
Expand Down Expand Up @@ -139,8 +139,8 @@
<gml:identifier codeSpace="">time period identifier</gml:identifier>
<gml:name>period name one</gml:name>
<gml:name>period name two</gml:name>
<gml:beginPosition>2018-06-24T00:00:00</gml:beginPosition>
<gml:endPosition>2016-12-31T00:00:00</gml:endPosition>
<gml:beginPosition>2018-06-24</gml:beginPosition>
<gml:endPosition>2016-12-31</gml:endPosition>
<gml:timeInterval unit="year">1.1</gml:timeInterval>
</gml:TimePeriod>
</mri:usageDateTime>
Expand All @@ -150,8 +150,8 @@
<gml:identifier codeSpace="">time period identifier</gml:identifier>
<gml:name>period name one</gml:name>
<gml:name>period name two</gml:name>
<gml:beginPosition>2019-05-15T00:00:00</gml:beginPosition>
<gml:endPosition>2016-12-31T00:00:00</gml:endPosition>
<gml:beginPosition>2019-05-15</gml:beginPosition>
<gml:endPosition>2016-12-31</gml:endPosition>
<gml:timeInterval unit="year">1.1</gml:timeInterval>
</gml:TimePeriod>
</mri:usageDateTime>
Expand Down

0 comments on commit 391a184

Please sign in to comment.