@@ -157,28 +157,24 @@ def import_(self, metadata: str) -> dict:
157
157
if identification .temporalextent_end :
158
158
temp_extent ['end' ] = identification .temporalextent_end
159
159
160
-
161
160
mcf ['identification' ]['extents' ]['temporal' ].append (temp_extent )
162
161
163
- if m . identification . denominators :
164
- mcf ['spatial' ]['denominators' ] = m . identification .denominators
162
+ if hasattr ( identification , ' denominators' ) :
163
+ mcf ['spatial' ]['denominators' ] = identification .denominators
165
164
166
- if m . identification . distance :
165
+ if hasattr ( identification , ' distance' ) :
167
166
mcf ['spatial' ]['resolution' ] = []
168
- for k , v in enumerate (m . identification .distance ):
167
+ for k , v in enumerate (identification .distance ):
169
168
uom = ''
170
- if m . identification . uom and len (m . identification .uom ) > k :
171
- uom = m . identification .uom [k ]
169
+ if hasattr ( identification , ' uom' ) and len (identification .uom ) > k :
170
+ uom = identification .uom [k ]
172
171
mcf ['spatial' ]['resolution' ].append ({'distance' : v ,
173
172
'uom' : uom })
174
173
175
- if m .identification .spatialrepresentationtype and len (m .identification .spatialrepresentationtype ) > 0 : # noqa
176
- mcf ['spatial' ]['datatype' ] = m .identification .spatialrepresentationtype [0 ] # noqa
177
-
178
- if m .identification .accessconstraints :
179
- mcf ['identification' ]['accessconstraints' ] = m .identification .accessconstraints [0 ] # noqa
174
+ if hasattr (identification , 'spatialrepresentationtype' ) and len (identification .spatialrepresentationtype ) > 0 : # noqa
175
+ mcf ['spatial' ]['datatype' ] = identification .spatialrepresentationtype [0 ] # noqa
180
176
181
- if identification . accessconstraints :
177
+ if hasattr ( identification , ' accessconstraints' ) :
182
178
mcf ['identification' ]['accessconstraints' ] = identification .accessconstraints [0 ] # noqa
183
179
184
180
mcf ['identification' ]['status' ] = identification .status
0 commit comments