Skip to content

Commit

Permalink
updates schema handling (CIRDLES#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
bowring committed May 24, 2017
1 parent 9c52423 commit 305405d
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 77 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -13,7 +13,7 @@ Our goal is to demonstrate the efficacy of our work in engineering a replacement
**Calamari** demonstrates that it is possible to replicate the earliest stages of the math of SQUID 2.50, for 'mainstream' U-Pb zircon applications. **Calamari** currently handles 'well-behaved' 9-peak (mass 196-254) and 10-peak (mass 196-270) zircon run-tables, where the background is acquired at the third mass-station (as is often the case). At present, **Calamari** does not contain any of SQUID's data-integrity checks relating to run-table changes mid-session, or SBM data that are sensible relative to the measured SBM-zero value.

**Calamari** reads in a SHRIMP Prawn XML file and reports if the file does not conform to our
existing [schema](https://github.com/bowring/XSD/blob/master/SHRIMP/SHRIMP_PRAWN.xsd). If it does conform, then
existing [schema](https://github.com/CIRDLES/ShrimpXSD/blob/master/SHRIMP_PRAWN.xsd). If it does conform, then
**Calamari** will produce a folder of 6 reports as ".csv" files that are explained [here](https://github.com/CIRDLES/ET_Redux/wiki/Calamari-Reports-Documentation).

**Requirements:**
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Expand Up @@ -6,7 +6,7 @@ subprojects {
apply plugin: "java"

group = "org.cirdles"
version = "1.4.5"
version = "1.4.6"

description = "Replacement for data reduction in Ludwig's Squid 2.50 for SHRIMP"

Expand Down
Expand Up @@ -36,13 +36,13 @@ public final class CalamariConstants {
+ " xmlns:xs=\"http://www.w3.org/2001/XMLSchema\"\n"
+ " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
+ " xsi:schemaLocation=\"https://raw.githubusercontent.com\n"
+ " https://raw.githubusercontent.com/bowring/XSD/master/SHRIMP/SHRIMP_PRAWN.xsd\">";
+ " https://raw.githubusercontent.com/CIRDLES/ShrimpXSD/master/SHRIMP_PRAWN.xsd\">";

/**
*
*/
public static final String URL_STRING_FOR_PRAWN_XML_SCHEMA
= "https://raw.githubusercontent.com/bowring/XSD/master/SHRIMP/SHRIMP_PRAWN.xsd";
= "https://raw.githubusercontent.com/CIRDLES/ShrimpXSD/master/SHRIMP_PRAWN.xsd";

/**
*
Expand Down
121 changes: 48 additions & 73 deletions core/src/main/java/org/cirdles/calamari/prawn/RunParameterNames.java
Expand Up @@ -18,237 +18,212 @@
* See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
* Any modifications to this file will be lost upon recompilation of the source schema.
* Generated on: 2015.10.25 at 07:31:08 AM EDT
*/

*/
package org.cirdles.calamari.prawn;

import java.io.Serializable;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;


/**
* <p>Java class for RunParameterNames.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* &lt;simpleType name="RunParameterNames"&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"&gt;
* &lt;enumeration value="title"/&gt;
* &lt;enumeration value="sets"/&gt;
* &lt;enumeration value="measurements"/&gt;
* &lt;enumeration value="scans"/&gt;
* &lt;enumeration value="dead_time_ns"/&gt;
* &lt;enumeration value="sbm_zero_cps"/&gt;
* &lt;enumeration value="autocentering"/&gt;
* &lt;enumeration value="qt1y_mode"/&gt;
* &lt;enumeration value="deflect_beam_between_peaks"/&gt;
* &lt;enumeration value="autocenter_method"/&gt;
* &lt;enumeration value="stage_x"/&gt;
* &lt;enumeration value="stage_y"/&gt;
* &lt;enumeration value="stage_z"/&gt;
* &lt;enumeration value="stage_map_quad_cal"/&gt;
* &lt;enumeration value="stage_map_cal"/&gt;
* &lt;enumeration value="detector_gains"/&gt;
* &lt;enumeration value="detector_zero_cps"/&gt;
* &lt;enumeration value="eisie_1_cps"/&gt;
* &lt;enumeration value="eisie_2_cps"/&gt;
* &lt;enumeration value="eisie_3_cps"/&gt;
* &lt;enumeration value="eisie_1_date_time"/&gt;
* &lt;enumeration value="eisie_2_date_time"/&gt;
* &lt;enumeration value="eisie_3_date_time"/&gt;
* &lt;enumeration value="primary_names"/&gt;
* &lt;enumeration value="primary_bits"/&gt;
* &lt;enumeration value="primary_volts"/&gt;
* &lt;enumeration value="secondary_names_bits"/&gt;
* &lt;enumeration value="secondary_bits"/&gt;
* &lt;enumeration value="secondary_names_volts"/&gt;
* &lt;enumeration value="secondary_volts"/&gt;
* &lt;/restriction&gt;
* &lt;/simpleType&gt;
* Java class for RunParameterNames.
*
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
* <p>
* <
* pre>
* &lt;simpleType name="RunParameterNames"&gt; &lt;restriction
* base="{http://www.w3.org/2001/XMLSchema}string"&gt; &lt;enumeration
* value="title"/&gt; &lt;enumeration value="sets"/&gt; &lt;enumeration
* value="measurements"/&gt; &lt;enumeration value="scans"/&gt; &lt;enumeration
* value="dead_time_ns"/&gt; &lt;enumeration value="sbm_zero_cps"/&gt;
* &lt;enumeration value="autocentering"/&gt; &lt;enumeration
* value="qt1y_mode"/&gt; &lt;enumeration
* value="deflect_beam_between_peaks"/&gt; &lt;enumeration
* value="autocenter_method"/&gt; &lt;enumeration value="stage_x"/&gt;
* &lt;enumeration value="stage_y"/&gt; &lt;enumeration value="stage_z"/&gt;
* &lt;enumeration value="stage_map_quad_cal"/&gt; &lt;enumeration
* value="stage_map_cal"/&gt; &lt;enumeration value="detector_gains"/&gt;
* &lt;enumeration value="detector_zero_cps"/&gt; &lt;enumeration
* value="eisie_1_cps"/&gt; &lt;enumeration value="eisie_2_cps"/&gt;
* &lt;enumeration value="eisie_3_cps"/&gt; &lt;enumeration
* value="eisie_1_date_time"/&gt; &lt;enumeration value="eisie_2_date_time"/&gt;
* &lt;enumeration value="eisie_3_date_time"/&gt; &lt;enumeration
* value="primary_names"/&gt; &lt;enumeration value="primary_bits"/&gt;
* &lt;enumeration value="primary_volts"/&gt; &lt;enumeration
* value="secondary_names_bits"/&gt; &lt;enumeration value="secondary_bits"/&gt;
* &lt;enumeration value="secondary_names_volts"/&gt; &lt;enumeration
* value="secondary_volts"/&gt; &lt;/restriction&gt; &lt;/simpleType&gt;
* </pre>
*
*
*/
@XmlType(name = "RunParameterNames")
@XmlEnum
public enum RunParameterNames implements Serializable{
public enum RunParameterNames implements Serializable {

/**
*
*/
@XmlEnumValue("title")
TITLE("title"),

/**
*
*/
@XmlEnumValue("sets")
SETS("sets"),

/**
*
*/
@XmlEnumValue("measurements")
MEASUREMENTS("measurements"),

/**
*
*/
@XmlEnumValue("scans")
SCANS("scans"),

/**
*
*/
@XmlEnumValue("dead_time_ns")
DEAD_TIME_NS("dead_time_ns"),

/**
*
*/
@XmlEnumValue("sbm_zero_cps")
SBM_ZERO_CPS("sbm_zero_cps"),

/**
*
*/
@XmlEnumValue("autocentering")
AUTOCENTERING("autocentering"),

/**
*
*/
@XmlEnumValue("qt1y_mode")
QT_1_Y_MODE("qt1y_mode"),

/**
*
*/
@XmlEnumValue("deflect_beam_between_peaks")
DEFLECT_BEAM_BETWEEN_PEAKS("deflect_beam_between_peaks"),

/**
*
*/
@XmlEnumValue("autocenter_method")
AUTOCENTER_METHOD("autocenter_method"),

/**
*
*/
@XmlEnumValue("stage_x")
STAGE_X("stage_x"),

/**
*
*/
@XmlEnumValue("stage_y")
STAGE_Y("stage_y"),

/**
*
*/
@XmlEnumValue("stage_z")
STAGE_Z("stage_z"),

/**
*
*/
@XmlEnumValue("stage_map_quad_cal")
STAGE_MAP_QUAD_CAL("stage_map_quad_cal"),

/**
*
*/
@XmlEnumValue("stage_map_cal")
STAGE_MAP_CAL("stage_map_cal"),

/**
*
*/
@XmlEnumValue("detector_gains")
DETECTOR_GAINS("detector_gains"),

/**
*
*/
@XmlEnumValue("detector_zero_cps")
DETECTOR_ZERO_CPS("detector_zero_cps"),

@XmlEnumValue("EISIE_measured")
EISIE_measured("EISIE_measured"),
@XmlEnumValue("EISIE_sets")
EISIE_sets("EISIE_sets"),
@XmlEnumValue("detector1_zero_sub_cps")
detector1_zero_sub_cps("detector1_zero_sub_cps"),
@XmlEnumValue("detector2_zero_sub_cps")
detector2_zero_sub_cps("detector2_zero_sub_cps"),
@XmlEnumValue("detector3_zero_sub_cps")
detector3_zero_sub_cps("detector3_zero_sub_cps"),
@XmlEnumValue("detector4_zero_sub_cps")
detector4_zero_sub_cps("detector4_zero_sub_cps"),
@XmlEnumValue("detector5_zero_sub_cps")
detector5_zero_sub_cps("detector5_zero_sub_cps"),
/**
*
*/
@XmlEnumValue("eisie_1_cps")
EISIE_1_CPS("eisie_1_cps"),

/**
*
*/
@XmlEnumValue("eisie_2_cps")
EISIE_2_CPS("eisie_2_cps"),

/**
*
*/
@XmlEnumValue("eisie_3_cps")
EISIE_3_CPS("eisie_3_cps"),

/**
*
*/
@XmlEnumValue("eisie_1_date_time")
EISIE_1_DATE_TIME("eisie_1_date_time"),

/**
*
*/
@XmlEnumValue("eisie_2_date_time")
EISIE_2_DATE_TIME("eisie_2_date_time"),

/**
*
*/
@XmlEnumValue("eisie_3_date_time")
EISIE_3_DATE_TIME("eisie_3_date_time"),

/**
*
*/
@XmlEnumValue("primary_names")
PRIMARY_NAMES("primary_names"),

/**
*
*/
@XmlEnumValue("primary_bits")
PRIMARY_BITS("primary_bits"),

/**
*
*/
@XmlEnumValue("primary_volts")
PRIMARY_VOLTS("primary_volts"),

/**
*
*/
@XmlEnumValue("secondary_names_bits")
SECONDARY_NAMES_BITS("secondary_names_bits"),

/**
*
*/
@XmlEnumValue("secondary_bits")
SECONDARY_BITS("secondary_bits"),

/**
*
*/
@XmlEnumValue("secondary_names_volts")
SECONDARY_NAMES_VOLTS("secondary_names_volts"),

/**
*
*/
Expand All @@ -274,7 +249,7 @@ public String value() {
* @return
*/
public static RunParameterNames fromValue(String v) {
for (RunParameterNames c: RunParameterNames.values()) {
for (RunParameterNames c : RunParameterNames.values()) {
if (c.value.equals(v)) {
return c;
}
Expand Down

0 comments on commit 305405d

Please sign in to comment.