Class: Rafflesia::OntologyModuleRelease

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/registry/ontology_module_release.rb

Constant Summary collapse

HASH_ATTRS =
{
  base_ontology_digest: :base_ontology_digest,
  base_ontology_release_id: :base_ontology_release_id,
  content_digest: :content_digest,
  coordinate_systems: :coordinate_systems,
  entity_types: :entity_types,
  id: :id,
  identifier_namespaces: :identifier_namespaces,
  namespace_prefix: :namespace_prefix,
  relations: :relations,
  relationship_overlays: :relationship_overlays,
  release_id: :release_id,
  repository_id: :repository_id,
  units: :units,
  value_kinds: :value_kinds,
  version: :version
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ OntologyModuleRelease

Returns a new instance of OntologyModuleRelease.



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/rafflesia/registry/ontology_module_release.rb', line 43

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @base_ontology_digest = hash[:base_ontology_digest]
  @base_ontology_release_id = hash[:base_ontology_release_id]
  @content_digest = hash[:content_digest]
  @coordinate_systems = (hash[:coordinate_systems] || []).map { |item| item ? Rafflesia::ModuleCoordinateSystem.new(item) : nil }
  @entity_types = (hash[:entity_types] || []).map { |item| item ? Rafflesia::ModuleEntityType.new(item) : nil }
  @id = hash[:id]
  @identifier_namespaces = (hash[:identifier_namespaces] || []).map { |item| item ? Rafflesia::ModuleIdentifierNamespace.new(item) : nil }
  @namespace_prefix = hash[:namespace_prefix]
  @relations = (hash[:relations] || []).map { |item| item ? Rafflesia::RelationDescriptor.new(item) : nil }
  @relationship_overlays = (hash[:relationship_overlays] || []).map { |item| item ? Rafflesia::RelationshipOverlay.new(item) : nil }
  @release_id = hash[:release_id]
  @repository_id = hash[:repository_id]
  @units = (hash[:units] || []).map { |item| item ? Rafflesia::ModuleUnit.new(item) : nil }
  @value_kinds = (hash[:value_kinds] || []).map { |item| item ? Rafflesia::ModuleValueKind.new(item) : nil }
  @version = hash[:version]
end

Instance Attribute Details

#base_ontology_digestObject

Returns the value of attribute base_ontology_digest.



26
27
28
# File 'lib/rafflesia/registry/ontology_module_release.rb', line 26

def base_ontology_digest
  @base_ontology_digest
end

#base_ontology_release_idObject

Returns the value of attribute base_ontology_release_id.



26
27
28
# File 'lib/rafflesia/registry/ontology_module_release.rb', line 26

def base_ontology_release_id
  @base_ontology_release_id
end

#content_digestObject

Returns the value of attribute content_digest.



26
27
28
# File 'lib/rafflesia/registry/ontology_module_release.rb', line 26

def content_digest
  @content_digest
end

#coordinate_systemsObject

Returns the value of attribute coordinate_systems.



26
27
28
# File 'lib/rafflesia/registry/ontology_module_release.rb', line 26

def coordinate_systems
  @coordinate_systems
end

#entity_typesObject

Returns the value of attribute entity_types.



26
27
28
# File 'lib/rafflesia/registry/ontology_module_release.rb', line 26

def entity_types
  @entity_types
end

#idObject

Returns the value of attribute id.



26
27
28
# File 'lib/rafflesia/registry/ontology_module_release.rb', line 26

def id
  @id
end

#identifier_namespacesObject

Returns the value of attribute identifier_namespaces.



26
27
28
# File 'lib/rafflesia/registry/ontology_module_release.rb', line 26

def identifier_namespaces
  @identifier_namespaces
end

#namespace_prefixObject

Returns the value of attribute namespace_prefix.



26
27
28
# File 'lib/rafflesia/registry/ontology_module_release.rb', line 26

def namespace_prefix
  @namespace_prefix
end

#relationsObject

Returns the value of attribute relations.



26
27
28
# File 'lib/rafflesia/registry/ontology_module_release.rb', line 26

def relations
  @relations
end

#relationship_overlaysObject

Returns the value of attribute relationship_overlays.



26
27
28
# File 'lib/rafflesia/registry/ontology_module_release.rb', line 26

def relationship_overlays
  @relationship_overlays
end

#release_idObject

Returns the value of attribute release_id.



26
27
28
# File 'lib/rafflesia/registry/ontology_module_release.rb', line 26

def release_id
  @release_id
end

#repository_idObject

Returns the value of attribute repository_id.



26
27
28
# File 'lib/rafflesia/registry/ontology_module_release.rb', line 26

def repository_id
  @repository_id
end

#unitsObject

Returns the value of attribute units.



26
27
28
# File 'lib/rafflesia/registry/ontology_module_release.rb', line 26

def units
  @units
end

#value_kindsObject

Returns the value of attribute value_kinds.



26
27
28
# File 'lib/rafflesia/registry/ontology_module_release.rb', line 26

def value_kinds
  @value_kinds
end

#versionObject

Returns the value of attribute version.



26
27
28
# File 'lib/rafflesia/registry/ontology_module_release.rb', line 26

def version
  @version
end