public class ParsedSectionSpec extends Object
Modifier and Type | Field and Description |
---|---|
ParsedSectionSpec |
child |
Section |
section |
Variable |
v |
Constructor and Description |
---|
ParsedSectionSpec()
Public simple constructor
|
ParsedSectionSpec(Variable v,
Section section) |
Modifier and Type | Method and Description |
---|---|
static String |
makeSectionSpecString(Variable v,
List<Range> ranges)
Make section specification String from a range list for a Variable.
|
static ParsedSectionSpec |
parseVariableSection(NetcdfFile ncfile,
String variableSection)
Parse a section specification String.
|
String |
toString() |
public Variable v
public Section section
public ParsedSectionSpec child
public static ParsedSectionSpec parseVariableSection(NetcdfFile ncfile, String variableSection) throws InvalidRangeException
section specification := selector | selector '.' selector selector := varName ['(' dims ')'] varName := ESCAPED_STRING dims := dim | dim, dims dim := ':' | slice | start ':' end | start ':' end ':' stride slice := INTEGER start := INTEGER stride := INTEGER end := INTEGER ESCAPED_STRING : must escape characters = ".("Nonterminals are in lower case, terminals are in upper case, literals are in single quotes. Optional components are enclosed between square braces '[' and ']'.
ncfile
- look for variable in herevariableSection
- the string to parse, eg "record(12).wind(1:20,:,3)"IllegalArgumentException
- when token is misformed, or variable name doesnt exist in ncfileInvalidRangeException
- if section does not match variable shapepublic static String makeSectionSpecString(Variable v, List<Range> ranges)
v
- for this Variable.ranges
- list of Range. Must includes all parent structures. The list be null, meaning use all.
Individual ranges may be null, meaning all for that dimension.