setType(DetectorType.fromString( element.getAttribute("Type")));
setType(DetectorType.fromString( element.getAttribute("Type")));
public void setDetectorType(DetectorType type, int instrumentIndex, int detectorIndex) { // Parents: {u'Instrument': {u'OME': None}} // Type is not a reference OME o0 = root; if (o0.sizeOfInstrumentList() == instrumentIndex) { o0.addInstrument(new Instrument()); } Instrument o1 = o0.getInstrument(instrumentIndex); if (o1.sizeOfDetectorList() == detectorIndex) { o1.addDetector(new Detector()); } Detector o2 = o1.getDetector(detectorIndex); o2.setType(type); }
public void setDetectorType(DetectorType type, int instrumentIndex, int detectorIndex) { // Parents: {u'Instrument': {u'OME': None}} // Type is not a reference OME o0 = root; if (o0.sizeOfInstrumentList() == instrumentIndex) { o0.addInstrument(new Instrument()); } Instrument o1 = o0.getInstrument(instrumentIndex); if (o1.sizeOfDetectorList() == detectorIndex) { o1.addDetector(new Detector()); } Detector o2 = o1.getDetector(detectorIndex); o2.setType(type); }
/** * Creates a detector. * * @param index The index of the detector in the file. * @return See above. */ public Detector createDetector(int index) { Detector detector = new Detector(); detector.setID("Detector:"+index); detector.setModel(COMPONENT_MODEL); detector.setManufacturer(COMPONENT_MANUFACTURER); detector.setSerialNumber(COMPONENT_SERIAL_NUMBER); detector.setLotNumber(COMPONENT_LOT_NUMBER); detector.setAmplificationGain(0.0); detector.setGain(1.0); detector.setOffset(2.0); detector.setVoltage(new ElectricPotential(100, UNITS.VOLT)); detector.setType(DETECTOR_TYPE); detector.setZoom(3.0); return detector; }