Class: InternalMetadata

Inherits:
Object
  • Object
show all
Defined in:
lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb

Overview

History: Stan Smith 2013-08-09 original script Stan Smith 2013-08-10 adding methods as needed Stan Smith 2013-09-19 added keywords Stan Smith 2013-09-20 change ” to nil for value attributes Stan Smith 2013-09-23 added distributor Stan Smith 2013-09-24 added distributor order process Stan Smith 2013-09-24 added digital transfer options Stan Smith 2013-09-24 added data transfer medium Stan Smith 2013-10-17 added browse graphic Stan Smith 2013-10-21 added address (separated from contact) Stan Smith 2013-10-25 added extent Stan Smith 2013-10-25 added bounding box Stan Smith 2013-10-25 added point Stan Smith 2013-10-25 added multi point Stan Smith 2013-10-25 added line string Stan Smith 2013-10-25 added polygon Stan Smith 2013-10-25 added linear ring Stan Smith 2013-10-25 added temporal extent Stan Smith 2013-10-25 added time instant Stan Smith 2013-10-25 added time period Stan Smith 2013-10-25 added vertical extent Stan Smith 2013-10-30 added constraint Stan Smith 2013-10-31 added resource maintenance Stan Smith 2013-11-19 added usage Stan Smith 2013-11-19 added taxonomy Stan Smith 2013-11-20 added data quality Stan Smith 2013-11-20 modified citation Stan Smith 2013-12-16 added phone book

Stan Smith 2014-04-23 added protocol and doi to online resource
Stan Smith 2014-04-24 added jsonVersion to newBase
Stan Smith 2014-04-24 renamed newDataId to newResourceInfo
Stan Smith 2014-04-24 reorganized newMetadata, newResourceInfo
Stan Smith 2014-04-24 added newMetadataInfo
Stan Smith 2014-04-25 modified newCitation for json schema 0.3.0
Stan Smith 2014-04-25 added resource Ids to newCitation
Stan Smith 2014-04-30 reorganized geometry blocks for json schema 0.3.0
Stan Smith 2014-05-02 added associatedResource
Stan Smith 2014-05-02 added additionalDocument
Stan Smith 2014-05-28 modified resourceId & responsibleParty for schema 0.5.0
Stan Smith 2014-08-15 modified citation, onlineResource, resourceId for 0.6.0
Stan Smith 2014-09-03 added spatialReferenceSystems for name, EPSG, and WKT for 0.6.0
Stan Smith 2014-11-06 added resourceType to resourceInfo for 0.9.0
Stan Smith 2014-11-06 removed metadataScope from metadataInfo for 0.9.0
Stan Smith 2014-11-06 added newAdditionalDocumentation

Instance Method Summary collapse

Constructor Details

#initializeInternalMetadata

initialize attribute values - nil initialize arrays - [] initialize hashes - {}



55
56
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 55

def initialize
end

Instance Method Details

#newAdditionalDocumentationObject



504
505
506
507
508
509
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 504

def newAdditionalDocumentation
	intObj = {
		resourceType: nil,
		citation: {}
	}
end

#newAddressObject



98
99
100
101
102
103
104
105
106
107
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 98

def newAddress
	intObj = {
		deliveryPoints: [],
		city: nil,
		adminArea: nil,
		postalCode: nil,
		country: nil,
		eMailList: []
	}
end

#newAssociatedResourceObject



494
495
496
497
498
499
500
501
502
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 494

def newAssociatedResource
	intObj = {
		associationType: nil,
		initiativeType: nil,
		resourceType: nil,
		resourceCitation: {},
		metadataCitation: {}
	}
end

#newBaseObject



58
59
60
61
62
63
64
65
66
67
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 58

def newBase
	intObj = {
		jsonVersion: {
			name: nil,
			version: nil
		},
		contacts: [],
		metadata: {}
	}
end

#newBoundingBoxObject



336
337
338
339
340
341
342
343
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 336

def newBoundingBox
	intObj = {
		westLong: nil,
		eastLong: nil,
		southLat: nil,
		northLat: nil
	}
end

#newBrowseGraphicObject



277
278
279
280
281
282
283
284
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 277

def newBrowseGraphic
	intObj = {
		bGName: nil,
		bGDescription: nil,
		bGType: nil,
		bGURI: nil
	}
end

#newCitationObject



184
185
186
187
188
189
190
191
192
193
194
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 184

def newCitation
	intObj = {
		citTitle: nil,
		citDate: [],
		citEdition: nil,
		citResourceIDs: [],
		citResponsibleParty: [],
		citResourceForms: [],
		citOlResources: []
	}
end

#newContactObject



77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 77

def newContact
	intObj =  {
		contactID: nil,
		indName: nil,
		orgName: nil,
		position: nil,
		phones: [],
		address: {},
		onlineRes: [],
		contactInstructions: nil
	}
end

#newDataProcessStepObject



460
461
462
463
464
465
466
467
468
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 460

def newDataProcessStep
	intObj = {
		stepID: nil,
		stepDescription: nil,
		stepRationale: nil,
		stepDateTime: {},
		stepProcessors: []
	}
end

#newDataQualityObject



445
446
447
448
449
450
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 445

def newDataQuality
	intObj = {
		dataScope: nil,
		dataLineage: {}
	}
end

#newDataSourceObject



470
471
472
473
474
475
476
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 470

def newDataSource
	intObj = {
		sourceDescription: nil,
		sourceCitation: {},
		sourceSteps: []
	}
end

#newDataUsageObject



403
404
405
406
407
408
409
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 403

def newDataUsage
	intObj = {
		specificUsage: nil,
		userLimits: nil,
		userContacts: []
	}
end

#newDateTimeObject



69
70
71
72
73
74
75
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 69

def newDateTime
	intObj = {
		dateTime: nil,
		dateType: nil,
		dateResolution: nil
	}
end

#newDigitalTransOptionObject



262
263
264
265
266
267
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 262

def newDigitalTransOption
	intObj = {
		online: [],
		offline: {}
	}
end

#newDistOrderObject



253
254
255
256
257
258
259
260
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 253

def newDistOrder
	intObj = {
		fees: nil,
		plannedDateTime: {},
		orderInstructions: nil,
		turnaround: nil
	}
end

#newDistributorObject



244
245
246
247
248
249
250
251
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 244

def newDistributor
	intObj = {
		distContact: {},
		distOrderProc: [],
		distFormat: [],
		distTransOption: []
	}
end

#newExtentObject



294
295
296
297
298
299
300
301
302
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 294

def newExtent
	intObj = {
		extDesc: nil,
		extGeoElements: [],
		extIdElements: [],
		extTempElements: [],
		extVertElements: []
	}
end

#newGeoElementObject



304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 304

def newGeoElement
	intObj = {
		elementId: nil,
		elementIncludeData: nil,
		elementName: nil,
		elementDescription: nil,
		temporalElements: [],
		verticalElements: [],
		elementIdentifiers: [],
		elementScope: nil,
		elementAcquisition: nil,
		elementSrs: {},
		elementGeometry: {}
	}
end

#newGeometryObject



328
329
330
331
332
333
334
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 328

def newGeometry
	intObj = {
		geoType: nil,
		geometry: {},
		dimension: nil
	}
end

#newKeywordObject



219
220
221
222
223
224
225
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 219

def newKeyword
	intObj = {
		keyword: [],
		keywordType: nil,
		keyTheCitation: {}
	}
end

#newLegalConObject



227
228
229
230
231
232
233
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 227

def newLegalCon
	intObj = {
		accessCons: [],
		useCons: [],
		otherCons: []
	}
end

#newLegalConstraintObject



386
387
388
389
390
391
392
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 386

def newLegalConstraint
	intObj = {
		accessCodes: [],
		useCodes: [],
		otherCons: []
	}
end

#newLineageObject



452
453
454
455
456
457
458
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 452

def newLineage
	intObj = {
		statement: nil,
		processSteps: [],
		dataSources: []
	}
end

#newMediumObject



269
270
271
272
273
274
275
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 269

def newMedium
	intObj = {
		mediumName: nil,
		mediumFormat: nil,
		mediumNote: nil
	}
end

#newMetadataObject



109
110
111
112
113
114
115
116
117
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 109

def 
	intObj = {
		metadataInfo: {},
		resourceInfo: {},
		distributorInfo: [],
		associatedResources: [],
		additionalDocuments: []
	}
end

#newMetadataExtensionObject



478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 478

def newMetadataExtension
	intObj = {
		onLineResource: {},
		extName: nil,
		extShortName: nil,
		extDefinition: nil,
		obligation: nil,
		dataType: nil,
		maxOccurrence: nil,
		parentEntities: [],
		rule: nil,
		rationales: [],
		extSources: []
	}
end

#newMetadataInfoObject



119
120
121
122
123
124
125
126
127
128
129
130
131
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 119

def newMetadataInfo
	intObj = {
		metadataId: {},
		parentMetadata: {},
		metadataCustodians: [],
		metadataCreateDate: {},
		metadataUpdateDate: {},
		metadataURI: nil,
		metadataStatus: nil,
		maintInfo: {},
		extensions: []
	}
end

#newOnlineResourceObject



140
141
142
143
144
145
146
147
148
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 140

def newOnlineResource
	intObj = {
		olResURI: nil,
		olResProtocol: nil,
	    olResName: nil,
		olResDesc: nil,
		olResFunction: nil
	}
end

#newPhoneObject



90
91
92
93
94
95
96
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 90

def newPhone
	intObj = {
		phoneServiceType: nil,
		phoneName: nil,
		phoneNumber: nil
	}
end

#newPolygonSetObject



345
346
347
348
349
350
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 345

def newPolygonSet
	intObj = {
		exteriorRing: {},
		exclusionRings: []
	}
end

#newResolutionObject



437
438
439
440
441
442
443
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 437

def newResolution
	intObj = {
		equivalentScale: nil,
		distance: nil,
		distanceUOM: nil
	}
end

#newResourceFormatObject



204
205
206
207
208
209
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 204

def newResourceFormat
	intObj = {
		formatName: nil,
		formatVersion: nil
	}
end

#newResourceIdObject



196
197
198
199
200
201
202
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 196

def newResourceId
	intObj = {
		identifier: nil,
		identifierType: nil,
		identifierCitation: {}
	}
end

#newResourceInfoObject



150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 150

def newResourceInfo
	intObj = {
		resourceType: nil,
		citation: {},
		timePeriod: {},
		abstract: nil,
		shortAbstract: nil,
		hasMapLocation?: nil,
		hasDataAvailable?: nil,
		purpose: nil,
		credits: [],
		status: nil,
		pointsOfContact: [],
		resourceMaint: [],
		graphicOverview: [],
		resourceFormats: [],
		resourceLanguages: [],
		descriptiveKeywords: [],
		resourceUses: [],
		useConstraints: [],
		legalConstraints: [],
		securityConstraints: [],
		taxonomy: {},
		spatialReferenceSystem: {},
		spatialRepresentationTypes: [],
		spatialResolutions: [],
		topicCategories: [],
		environmentDescription: nil,
		extents: [],
		dataQualityInfo: [],
		supplementalInfo: nil
	}
end

#newResourceMaintObject



211
212
213
214
215
216
217
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 211

def newResourceMaint
	intObj = {
		maintFreq: nil,
		maintNotes: [],
		maintContacts: []
	}
end

#newRespPartyObject



133
134
135
136
137
138
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 133

def newRespParty
	intObj = {
		contactID: nil,
		roleName: nil
	}
end

#newSecurityConObject



235
236
237
238
239
240
241
242
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 235

def newSecurityCon
	intObj = {
		classification: nil,
		userNote: nil,
		classSystem: nil,
		handlingDesc: nil
	}
end

#newSecurityConstraintObject



394
395
396
397
398
399
400
401
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 394

def newSecurityConstraint
	intObj = {
		classCode: nil,
		userNote: nil,
		classSystem: nil,
		handlingDesc: nil
	}
end

#newSpatialReferenceSystemObject



286
287
288
289
290
291
292
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 286

def newSpatialReferenceSystem
	intObj = {
		sRNames: [],
		sREPSGs: [],
		sRWKTs: []
	}
end

#newSRSObject



320
321
322
323
324
325
326
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 320

def newSRS
	intObj = {
		srsName: nil,
		srsHref: nil,
		sysType: nil
	}
end

#newTaxonClassObject



429
430
431
432
433
434
435
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 429

def newTaxonClass
	intObj = {
		commonName: nil,
		taxRankName: nil,
		taxRankValue: nil
	}
end

#newTaxonSystemObject



411
412
413
414
415
416
417
418
419
420
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 411

def newTaxonSystem
	intObj = {
		taxClassSys: [],
		taxGeneralScope: nil,
		taxObservers: [],
		taxIdProcedures: nil,
		taxVoucher: {},
		taxClasses: []
	}
end

#newTaxonVoucherObject



422
423
424
425
426
427
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 422

def newTaxonVoucher
	intObj = {
		specimen: nil,
		repository: {}
	}
end

#newTemporalElementObject



352
353
354
355
356
357
358
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 352

def newTemporalElement
	intObj = {
		date: {},
		timeInstant: {},
		timePeriod: {}
	}
end

#newTimeInstantObject



360
361
362
363
364
365
366
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 360

def newTimeInstant
	intObj = {
		timeID: nil,
		description: nil,
	    timePosition: {}
	}
end

#newTimePeriodObject



368
369
370
371
372
373
374
375
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 368

def newTimePeriod
	intObj = {
		timeID: nil,
		description: nil,
		beginTime: {},
		endTime: {}
	}
end

#newVerticalElementObject



377
378
379
380
381
382
383
384
# File 'lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb', line 377

def newVerticalElement
	intObj = {
		minValue: nil,
		maxValue: nil,
		crsURI: nil,
		crsTitle: nil
	}
end