Skip to content

Commit

Permalink
PrairieMetadata: add API to query spectral mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrueden committed Dec 3, 2014
1 parent 8ebe0c5 commit 58db168
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,9 @@ public class Sequence {
/** {@code cycle} of this {@code <Sequence>}. */
private Integer cycle;

/** {@code SpectralMode} of this {@code <Sequence>}. */
private boolean spectralMode;

/**
* Creates a new sequence by parsing the given {@code <Sequence>} element.
*/
Expand All @@ -587,6 +590,7 @@ public void parse(final Element sequenceElement) {
if (cycle == null) {
throw new IllegalArgumentException("Sequence missing cycle attribute");
}
spectralMode = b(attr(sequenceElement, "SpectralMode"));

// iterate over all Frame elements
final NodeList frameNodes = sequenceElement.getElementsByTagName("Frame");
Expand Down Expand Up @@ -622,6 +626,10 @@ public int getCycle() {
return cycle;
}

public boolean isSpectralMode() {
return spectralMode;
}

/**
* Gets the minimum index value. Matches the smallest {@code index}
* attribute found, and hence will not necessarily equal {@code 1} (though
Expand Down

0 comments on commit 58db168

Please sign in to comment.