Class: NetCDF::CDMNode

Inherits:
Object
  • Object
show all
Defined in:
lib/netcdf/cdm_node.rb

Overview

Define a superclass for all the CDM node classes: Group, Dimension, etc. Define the sort of the node CDMSort so that we can 1. do true switching on node type 2. avoid use of instanceof 3. Use container classes that have more than one kind of node

Also move various common fields and methods to here.

Direct Known Subclasses

Attribute, Dimension, Group, Variable

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(netcdf_cdmnode) ⇒ CDMNode


Initializes a CDMNode with a java CDMNode



40
41
42
# File 'lib/netcdf/cdm_node.rb', line 40

def initialize(netcdf_cdmnode)
  @netcdf_elmt = netcdf_cdmnode
end

Instance Attribute Details

#netcdf_elmtObject (readonly)

Returns the value of attribute netcdf_elmt


34
35
36
# File 'lib/netcdf/cdm_node.rb', line 34

def netcdf_elmt
  @netcdf_elmt
end

Instance Method Details

#get_full_nameObject Also known as: get_full_name_escaped




48
49
50
# File 'lib/netcdf/cdm_node.rb', line 48

def get_full_name
  @netcdf_elmt.getFullName()
end

#get_short_nameObject Also known as: name




58
59
60
# File 'lib/netcdf/cdm_node.rb', line 58

def get_short_name
  @netcdf_elmt.getShortName()
end