public class ParsedSectionSpec
extends java.lang.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 java.lang.String |
makeSectionSpecString(Variable v,
java.util.List<Range> ranges)
Make section specification String from a range list for a Variable.
|
static ParsedSectionSpec |
parseVariableSection(NetcdfFile ncfile,
java.lang.String variableSection)
Parse a section specification String.
|
java.lang.String |
toString() |
public Variable v
public Section section
public ParsedSectionSpec child
public static ParsedSectionSpec parseVariableSection(NetcdfFile ncfile, java.lang.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)"java.lang.IllegalArgumentException
- when token is misformed, or variable name doesnt exist in ncfileInvalidRangeException
- if section does not match variable shapepublic static java.lang.String makeSectionSpecString(Variable v, java.util.List<Range> ranges) throws InvalidRangeException
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.InvalidRangeException
- is specified section doesnt match variable shapepublic java.lang.String toString()
toString
in class java.lang.Object