adiwg-mdtranslator 2.4.0 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +51 -1
- data/lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb +33 -2
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_attribute.rb +68 -35
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_codeSet.rb +66 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_entity.rb +7 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_entityOverview.rb +10 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_enumerated.rb +38 -19
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_range.rb +68 -19
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_transferInfo.rb +3 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/mdJson_reader.rb +4 -2
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_domain.rb +87 -79
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_entity.rb +150 -115
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_entityAttribute.rb +184 -113
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_valueRange.rb +56 -0
- data/lib/adiwg/mdtranslator/version.rb +7 -1
- data/lib/adiwg/mdtranslator/writers/html/sections/html_body.rb +3 -3
- data/lib/adiwg/mdtranslator/writers/html/sections/html_dataDictionary.rb +6 -6
- data/lib/adiwg/mdtranslator/writers/html/sections/html_domain.rb +74 -38
- data/lib/adiwg/mdtranslator/writers/html/sections/html_ellipsoidParameters.rb +68 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_entity.rb +130 -76
- data/lib/adiwg/mdtranslator/writers/html/sections/html_entityAttribute.rb +78 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_identifier.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/html/sections/html_obliqueLinePoint.rb +37 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_projectionParameters.rb +229 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_referenceSystemParameters.rb +65 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_spatialReference.rb +19 -1
- data/lib/adiwg/mdtranslator/writers/html/sections/html_verticalDatumParameters.rb +69 -0
- data/lib/adiwg/mdtranslator/writers/iso19110/classes/class_address.rb +103 -103
- data/lib/adiwg/mdtranslator/writers/iso19110/classes/class_citation.rb +185 -0
- data/lib/adiwg/mdtranslator/writers/iso19110/classes/class_date.rb +60 -0
- data/lib/adiwg/mdtranslator/writers/iso19110/classes/class_definitionReference.rb +45 -0
- data/lib/adiwg/mdtranslator/writers/iso19110/classes/class_domain.rb +107 -0
- data/lib/adiwg/mdtranslator/writers/iso19110/classes/class_fcFeatureCatalogue.rb +187 -187
- data/lib/adiwg/mdtranslator/writers/iso19110/classes/class_featureAttribute.rb +123 -117
- data/lib/adiwg/mdtranslator/writers/iso19110/classes/class_featureType.rb +155 -141
- data/lib/adiwg/mdtranslator/writers/iso19110/classes/class_gcoDateTime.rb +48 -0
- data/lib/adiwg/mdtranslator/writers/iso19110/classes/class_listedValue.rb +54 -55
- data/lib/adiwg/mdtranslator/writers/iso19110/classes/class_mdIdentifier.rb +56 -0
- data/lib/adiwg/mdtranslator/writers/iso19110/classes/class_series.rb +63 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_attributeGroup.rb +51 -50
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_citation.rb +181 -180
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_crs.rb +96 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_ellipsoidParameters.rb +62 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_keyword.rb +54 -54
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_miMetadata.rb +301 -298
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_obliqueLinePoint.rb +53 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_projectionParameters.rb +229 -0
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_referenceSystem.rb +49 -32
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_domain.rb +5 -2
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_entity.rb +7 -1
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_entityAttribute.rb +18 -2
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_valueRange.rb +28 -0
- data/lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_budget.rb +33 -13
- metadata +22 -4
- data/lib/adiwg/mdtranslator/readers/mdJson/version.rb +0 -16
@@ -3,127 +3,133 @@
|
|
3
3
|
# create attributes for entities
|
4
4
|
|
5
5
|
# History:
|
6
|
-
#
|
7
|
-
#
|
8
|
-
#
|
9
|
-
#
|
10
|
-
#
|
6
|
+
# Stan Smith 2017-11-02 split out domain from attribute
|
7
|
+
# Stan Smith 2017-02-02 refactored for mdTranslator/mdJson 2.0
|
8
|
+
# Stan Smith 2015-07-14 refactored to eliminate namespace globals $WriterNS and $IsoNS
|
9
|
+
# Stan Smith 2015-07-14 refactored to make iso19110 independent of iso19115_2 classes
|
10
|
+
# Stan Smith 2015-06-22 replace global ($response) with passed in object (responseObj)
|
11
|
+
# Stan Smith 2014-12-12 refactored to handle namespacing readers and writers
|
11
12
|
# Stan Smith 2014-12-02 original script
|
12
13
|
|
13
14
|
require_relative 'class_multiplicity'
|
14
|
-
require_relative 'class_listedValue'
|
15
15
|
require_relative 'class_unitsOfMeasure'
|
16
|
+
require_relative 'class_definitionReference'
|
17
|
+
require_relative 'class_domain'
|
16
18
|
|
17
19
|
module ADIWG
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
20
|
+
module Mdtranslator
|
21
|
+
module Writers
|
22
|
+
module Iso19110
|
23
|
+
|
24
|
+
class FC_FeatureAttribute
|
25
|
+
|
26
|
+
def initialize(xml, responseObj)
|
27
|
+
@xml = xml
|
28
|
+
@hResponseObj = responseObj
|
29
|
+
end
|
30
|
+
|
31
|
+
def writeXML(hAttribute)
|
32
|
+
|
33
|
+
# classes used
|
34
|
+
multiClass = Multiplicity.new(@xml, @hResponseObj)
|
35
|
+
uomClass = UnitsOfMeasure.new(@xml, @hResponseObj)
|
36
|
+
defRefClass = FC_DefinitionReference.new(@xml, @hResponseObj)
|
37
|
+
domainClass = Domain.new(@xml, @hResponseObj)
|
38
|
+
|
39
|
+
@xml.tag!('gfc:FC_FeatureAttribute') do
|
40
|
+
|
41
|
+
# feature attribute - member name (required)
|
42
|
+
# used for attribute common name
|
43
|
+
s = hAttribute[:attributeName]
|
44
|
+
unless s.nil?
|
45
|
+
@xml.tag!('gfc:memberName') do
|
46
|
+
@xml.tag!('gco:LocalName', s)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
if s.nil?
|
50
|
+
@xml.tag!('gfc:memberName', {'gco:nilReason' => 'missing'})
|
51
|
+
end
|
52
|
+
|
53
|
+
# feature attribute - definition
|
54
|
+
# not required by ISO, but important enough to indicate if missing
|
55
|
+
s = hAttribute[:attributeDefinition]
|
56
|
+
unless s.nil?
|
57
|
+
@xml.tag!('gfc:definition') do
|
58
|
+
@xml.tag!('gco:CharacterString', s)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
if s.nil?
|
62
|
+
@xml.tag!('gfc:definition', {'gco:nilReason' => 'missing'})
|
63
|
+
end
|
64
|
+
|
65
|
+
# feature attribute - cardinality (required)
|
66
|
+
@xml.tag!('gfc:cardinality') do
|
67
|
+
multiClass.writeXML(hAttribute)
|
68
|
+
end
|
69
|
+
|
70
|
+
# feature attribute - definition reference {definitionReference}
|
71
|
+
hCitation = hAttribute[:attributeReference]
|
72
|
+
unless hCitation.empty?
|
73
|
+
@xml.tag!('gfc:definitionReference') do
|
74
|
+
defRefClass.writeXML(hCitation)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
if hCitation.empty? && @hResponseObj[:writerShowTags]
|
78
|
+
@xml.tag!('gfc:definitionReference')
|
79
|
+
end
|
80
|
+
|
81
|
+
# feature attribute - code
|
82
|
+
s = hAttribute[:attributeCode]
|
83
|
+
unless s.nil?
|
84
|
+
@xml.tag!('gfc:code') do
|
85
|
+
@xml.tag!('gco:CharacterString', s)
|
86
|
+
end
|
87
|
+
end
|
88
|
+
if s.nil? && @hResponseObj[:writerShowTags]
|
89
|
+
@xml.tag!('gfc:code')
|
90
|
+
end
|
91
|
+
|
92
|
+
# feature attribute - value measurement unit (units of measure)
|
93
|
+
s = hAttribute[:unitOfMeasure]
|
94
|
+
unless s.nil?
|
95
|
+
@xml.tag!('gfc:valueMeasurementUnit') do
|
96
|
+
uomClass.writeUnits(s)
|
97
|
+
end
|
98
|
+
end
|
99
|
+
if s.nil? && @hResponseObj[:writerShowTags]
|
100
|
+
@xml.tag!('gfc:valueMeasurementUnit')
|
101
|
+
end
|
102
|
+
|
103
|
+
# feature attribute - value type (datatype)
|
104
|
+
s = hAttribute[:dataType]
|
105
|
+
unless s.nil?
|
106
|
+
@xml.tag!('gfc:valueType') do
|
107
|
+
@xml.tag!('gco:TypeName') do
|
108
|
+
@xml.tag!('gco:aName') do
|
109
|
+
@xml.tag!('gco:CharacterString', s)
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
114
|
+
if s.nil? && @hResponseObj[:writerShowTags]
|
115
|
+
@xml.tag!('gfc:valueType')
|
116
|
+
end
|
117
|
+
|
118
|
+
# feature attribute - domains
|
119
|
+
domainID = hAttribute[:domainId]
|
120
|
+
unless domainID.nil?
|
121
|
+
# find domain in domain array
|
122
|
+
hDomain = ADIWG::Mdtranslator::Writers::Iso19110.getDomain(domainID)
|
123
|
+
unless hDomain.empty?
|
124
|
+
domainClass.writeXML(hDomain)
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
end # gfc:FC_FeatureAttribute tag
|
129
|
+
end # writeXML
|
130
|
+
end # gfc:FC_FeatureAttribute class
|
131
|
+
|
132
|
+
end
|
133
|
+
end
|
134
|
+
end
|
129
135
|
end
|
@@ -2,153 +2,167 @@
|
|
2
2
|
# writer output in XML
|
3
3
|
|
4
4
|
# History:
|
5
|
-
#
|
6
|
-
#
|
7
|
-
#
|
8
|
-
#
|
9
|
-
#
|
10
|
-
#
|
5
|
+
# Stan Smith 2017-11-02 add entity reference
|
6
|
+
# Stan Smith 2017-02-03 refactored for mdJson/mdTranslator 2.0
|
7
|
+
# Stan Smith 2015-07-14 refactored to eliminate namespace globals $WriterNS and $IsoNS
|
8
|
+
# Stan Smith 2015-07-14 refactored to make iso19110 independent of iso19115_2 classes
|
9
|
+
# Stan Smith 2015-06-22 replace global ($response) with passed in object (responseObj)
|
10
|
+
# Stan Smith 2015-02-18 added aliases for entities
|
11
|
+
# Stan Smith 2014-12-12 refactored to handle namespacing readers and writers
|
11
12
|
# Stan Smith 2014-12-02 original script
|
12
13
|
|
13
14
|
require_relative 'class_featureConstraint'
|
14
15
|
require_relative 'class_featureAttribute'
|
16
|
+
require_relative 'class_definitionReference'
|
15
17
|
|
16
18
|
module ADIWG
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
19
|
+
module Mdtranslator
|
20
|
+
module Writers
|
21
|
+
module Iso19110
|
22
|
+
|
23
|
+
class FC_FeatureType
|
24
|
+
|
25
|
+
def initialize(xml, responseObj)
|
26
|
+
@xml = xml
|
27
|
+
@hResponseObj = responseObj
|
28
|
+
end
|
29
|
+
|
30
|
+
def writeXML(hEntity)
|
31
|
+
|
32
|
+
# classes used
|
33
|
+
fConClass = FC_Constraint.new(@xml, @hResponseObj)
|
34
|
+
fAttClass = FC_FeatureAttribute.new(@xml, @hResponseObj)
|
35
|
+
defRefClass = FC_DefinitionReference.new(@xml, @hResponseObj)
|
36
|
+
|
37
|
+
# create an identity for the entity
|
38
|
+
entityId = hEntity[:entityId]
|
39
|
+
if entityId.nil?
|
40
|
+
@hResponseObj[:writerMissingIdCount] = @hResponseObj[:writerMissingIdCount].succ
|
41
|
+
entityId = 'entity' + @hResponseObj[:writerMissingIdCount]
|
42
|
+
else
|
43
|
+
entityId.gsub!(/[^0-9a-zA-Z]/, '')
|
44
|
+
end
|
45
|
+
|
46
|
+
@xml.tag!('gfc:FC_FeatureType', {'id' => entityId}) do
|
47
|
+
|
48
|
+
# feature type - type name (required)
|
49
|
+
# used for entity common name
|
50
|
+
s = hEntity[:entityName]
|
51
|
+
unless s.nil?
|
52
|
+
@xml.tag!('gfc:typeName') do
|
53
|
+
@xml.tag!('gco:LocalName', s)
|
41
54
|
end
|
55
|
+
end
|
56
|
+
if s.nil?
|
57
|
+
@xml.tag!('gfc:typeName', {'gco:nilReason' => 'missing'})
|
58
|
+
end
|
59
|
+
|
60
|
+
# feature type - definition
|
61
|
+
s = hEntity[:entityDefinition]
|
62
|
+
unless s.nil?
|
63
|
+
@xml.tag!('gfc:definition') do
|
64
|
+
@xml.tag!('gco:CharacterString', s)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
if s.nil? && @hResponseObj[:writerShowTags]
|
68
|
+
@xml.tag!('gfc:definition')
|
69
|
+
end
|
70
|
+
|
71
|
+
# feature type - code
|
72
|
+
# used for entity code name
|
73
|
+
s = hEntity[:entityCode]
|
74
|
+
unless s.nil?
|
75
|
+
@xml.tag!('gfc:code') do
|
76
|
+
@xml.tag!('gco:CharacterString', s)
|
77
|
+
end
|
78
|
+
end
|
79
|
+
if s.nil? && @hResponseObj[:writerShowTags]
|
80
|
+
@xml.tag!('gfc:code')
|
81
|
+
end
|
82
|
+
|
83
|
+
# feature type - isAbstract (required)
|
84
|
+
# always defaulted to false
|
85
|
+
@xml.tag!('gfc:isAbstract') do
|
86
|
+
@xml.tag!('gco:Boolean', 'false')
|
87
|
+
end
|
88
|
+
|
89
|
+
# feature type - aliases
|
90
|
+
aAliases = hEntity[:entityAlias]
|
91
|
+
aAliases.each do |myAlias|
|
92
|
+
@xml.tag!('gfc:aliases') do
|
93
|
+
@xml.tag!('gco:LocalName', myAlias)
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
# feature type - feature catalogue (required)
|
98
|
+
# 'role that links this feature type to the feature catalogue that contains it'
|
99
|
+
# confusing, allows definition of another feature catalogue here
|
100
|
+
# just set to nilReason = 'inapplicable' (as recommended by NOAA)
|
101
|
+
@xml.tag!('gfc:featureCatalogue', {'gco:nilReason' => 'inapplicable'})
|
102
|
+
|
103
|
+
# feature type - constrained by
|
104
|
+
# use to define primary key, foreign keys, and indexes
|
105
|
+
# feature type - primary key
|
106
|
+
aPKs = hEntity[:primaryKey]
|
107
|
+
unless aPKs.empty?
|
108
|
+
@xml.tag!('gfc:constrainedBy') do
|
109
|
+
fConClass.writeXML('pk', aPKs)
|
110
|
+
end
|
111
|
+
end
|
112
|
+
if aPKs.empty? && @hResponseObj[:writerShowTags]
|
113
|
+
@xml.tag!('gfc:constrainedBy')
|
114
|
+
end
|
115
|
+
|
116
|
+
# feature type - indexes
|
117
|
+
aIndexes = hEntity[:indexes]
|
118
|
+
unless aIndexes.empty?
|
119
|
+
aIndexes.each do |hIndex|
|
120
|
+
@xml.tag!('gfc:constrainedBy') do
|
121
|
+
fConClass.writeXML('index', hIndex)
|
122
|
+
end
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
# feature type - foreign keys
|
127
|
+
aFKs = hEntity[:foreignKeys]
|
128
|
+
unless aFKs.empty?
|
129
|
+
aFKs.each do |hFK|
|
130
|
+
@xml.tag!('gfc:constrainedBy') do
|
131
|
+
fConClass.writeXML('fk', hFK)
|
132
|
+
end
|
133
|
+
end
|
134
|
+
end
|
42
135
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
end
|
76
|
-
if s.nil? && @hResponseObj[:writerShowTags]
|
77
|
-
@xml.tag!('gfc:code')
|
78
|
-
end
|
79
|
-
|
80
|
-
# feature type - isAbstract (required)
|
81
|
-
# always defaulted to false
|
82
|
-
@xml.tag!('gfc:isAbstract') do
|
83
|
-
@xml.tag!('gco:Boolean', 'false')
|
84
|
-
end
|
85
|
-
|
86
|
-
# feature type - aliases
|
87
|
-
aAliases = hEntity[:entityAlias]
|
88
|
-
aAliases.each do |myAlias|
|
89
|
-
@xml.tag!('gfc:aliases') do
|
90
|
-
@xml.tag!('gco:LocalName',myAlias)
|
91
|
-
end
|
92
|
-
end
|
93
|
-
|
94
|
-
# feature type - feature catalogue (required)
|
95
|
-
# 'role that links this feature type to the feature catalogue that contains it'
|
96
|
-
# confusing, allows definition of another feature catalogue here
|
97
|
-
# just set to nilReason = 'inapplicable' (as recommended by NOAA)
|
98
|
-
@xml.tag!('gfc:featureCatalogue', {'gco:nilReason' => 'inapplicable'})
|
99
|
-
|
100
|
-
# feature type - constrained by
|
101
|
-
# use to define primary key, foreign keys, and indexes
|
102
|
-
# constraint - primary key
|
103
|
-
aPKs = hEntity[:primaryKey]
|
104
|
-
unless aPKs.empty?
|
105
|
-
@xml.tag!('gfc:constrainedBy') do
|
106
|
-
fConClass.writeXML('pk', aPKs)
|
107
|
-
end
|
108
|
-
end
|
109
|
-
if aPKs.empty? && @hResponseObj[:writerShowTags]
|
110
|
-
@xml.tag!('gfc:constrainedBy')
|
111
|
-
end
|
112
|
-
|
113
|
-
# constraint - indexes
|
114
|
-
aIndexes = hEntity[:indexes]
|
115
|
-
unless aIndexes.empty?
|
116
|
-
aIndexes.each do |hIndex|
|
117
|
-
@xml.tag!('gfc:constrainedBy') do
|
118
|
-
fConClass.writeXML('index', hIndex)
|
119
|
-
end
|
120
|
-
end
|
121
|
-
end
|
122
|
-
|
123
|
-
# constraint - foreign keys
|
124
|
-
aFKs = hEntity[:foreignKeys]
|
125
|
-
unless aFKs.empty?
|
126
|
-
aFKs.each do |hFK|
|
127
|
-
@xml.tag!('gfc:constrainedBy') do
|
128
|
-
fConClass.writeXML('fk', hFK)
|
129
|
-
end
|
130
|
-
end
|
131
|
-
end
|
132
|
-
|
133
|
-
# feature type - character of characteristics
|
134
|
-
# used to define entity attributes
|
135
|
-
aAttributes = hEntity[:attributes]
|
136
|
-
unless aAttributes.empty?
|
137
|
-
aAttributes.each do |hAttribute|
|
138
|
-
@xml.tag!('gfc:carrierOfCharacteristics') do
|
139
|
-
fAttClass.writeXML(hAttribute)
|
140
|
-
end
|
141
|
-
end
|
142
|
-
end
|
143
|
-
if aAttributes.empty? && @hResponseObj[:writerShowTags]
|
144
|
-
@xml.tag!('gfc:carrierOfCharacteristics')
|
145
|
-
end
|
146
|
-
|
147
|
-
end # gfc:FC_FeatureType tag
|
148
|
-
end # writeXML
|
149
|
-
end # FC_FeatureType class
|
150
|
-
|
151
|
-
end
|
152
|
-
end
|
153
|
-
end
|
136
|
+
# feature type - entity reference
|
137
|
+
aRef = hEntity[:entityReferences]
|
138
|
+
unless aRef.empty?
|
139
|
+
@xml.tag!('gfc:definitionReference') do
|
140
|
+
defRefClass.writeXML(aRef[0])
|
141
|
+
end
|
142
|
+
end
|
143
|
+
if aRef.empty? && @hResponseObj[:writerShowTags]
|
144
|
+
@xml.tag!('gfc:definitionReference')
|
145
|
+
end
|
146
|
+
|
147
|
+
# feature type - character of characteristics
|
148
|
+
# used to define entity attributes
|
149
|
+
aAttributes = hEntity[:attributes]
|
150
|
+
unless aAttributes.empty?
|
151
|
+
aAttributes.each do |hAttribute|
|
152
|
+
@xml.tag!('gfc:carrierOfCharacteristics') do
|
153
|
+
fAttClass.writeXML(hAttribute)
|
154
|
+
end
|
155
|
+
end
|
156
|
+
end
|
157
|
+
if aAttributes.empty? && @hResponseObj[:writerShowTags]
|
158
|
+
@xml.tag!('gfc:carrierOfCharacteristics')
|
159
|
+
end
|
160
|
+
|
161
|
+
end # gfc:FC_FeatureType tag
|
162
|
+
end # writeXML
|
163
|
+
end # FC_FeatureType class
|
164
|
+
|
165
|
+
end
|
166
|
+
end
|
167
|
+
end
|
154
168
|
end
|