function A = getArray(this)
%GETARRAY  Reads array value.
%
%   Array = GETARRAY(ValueArray)


A = getArray(this.Storage,this.Variable);

% Set the sample size
s = size(A);
if length(s)>=2
    this.SampleSize = [s(2) 1];
else
    this.SampleSize = s(2:end);
end

% If a time vector is returned as a cell array of datestrs it must be
% converted to numerical form and the metadata assigned accordingly.
% In effect we are performing a setAbsTime with the time being defined 
% by the data src
if strcmpi(this.Variable.Name,'Time') && iscell(A) && ishandle(this.metadata)
    ref = A{1};
    A = datenum(A);
    A = A-A(1);
    % Update time metadata start and end times
    this.metadata.getData(A);
    % Overwrite other metadata props
    set(this.metadata,'Startdate',ref,'Units','days','Format','datestr');
elseif ishandle(this.metadata)
   % Update time metadata start and end times. Note "End" is a 
   % private propery so we can't to the update here
   this.metadata.getData(A);
else
   error('Metadata must be set before this property can be accessed')
end

