Instrument a = new Instrument(...); Instrument b = new Instrument(...); Instrument c = new Instrument(...); Instrument d = new Instrument(...); System.out.println(c.getNum()); // prints 3, num of "c" instrument System.out.println(Instrument.getID()); // prints 4 (total of instruments)
Instrument instrument = new Instrument(); instrument.setMyPropOne("val1"); // set other values ObjectMapper mapper = new ObjectMapper(); // configure mapper if needed mapper.writeValueAsString(instrument);
final Instrument ocarina = new Instrument(); // Since our Instruments are strongly-typed, we can provide mutators that only take // specific types, such as Strings, ParseUsers, or enum types. ocarina.setType(InstrumentType.WOODWIND);
public void setInstrumentID(String id, int instrumentIndex) { // Parents: {u'OME': None} // ID is not a reference OME o0 = root; if (o0.sizeOfInstrumentList() == instrumentIndex) { o0.addInstrument(new Instrument()); } Instrument o1 = o0.getInstrument(instrumentIndex); model.addModelObject(id, o1); o1.setID(id); }
public void setInstrumentID(String id, int instrumentIndex) { // Parents: {u'OME': None} // ID is not a reference OME o0 = root; if (o0.sizeOfInstrumentList() == instrumentIndex) { o0.addInstrument(new Instrument()); } Instrument o1 = o0.getInstrument(instrumentIndex); model.addModelObject(id, o1); o1.setID(id); }
/** Sets the Map value associated with this generic light source */ public void setGenericExcitationSourceMap(List<MapPair> map, int instrumentIndex, int lightSourceIndex) { OME o0 = root; if (o0.sizeOfInstrumentList() == instrumentIndex) { o0.addInstrument(new Instrument()); } Instrument o1 = o0.getInstrument(instrumentIndex); if (o1.sizeOfLightSourceList() == lightSourceIndex) { o1.addLightSource(new GenericExcitationSource()); } LightSource o2 = o1.getLightSource(lightSourceIndex); ((GenericExcitationSource)o2).setMap(map); }
public void setArcSerialNumber(String serialNumber, int instrumentIndex, int lightSourceIndex) { // Parents: None // SerialNumber is not a reference OME o0 = root; if (o0.sizeOfInstrumentList() == instrumentIndex) { o0.addInstrument(new Instrument()); } Instrument o1 = o0.getInstrument(instrumentIndex); if (o1.sizeOfLightSourceList() == lightSourceIndex) { o1.addLightSource(new Arc()); } Arc o2 = (Arc) o1.getLightSource(lightSourceIndex); o2.setSerialNumber(serialNumber); }
public void setDetectorAmplificationGain(Double amplificationGain, int instrumentIndex, int detectorIndex) { // Parents: {u'Instrument': {u'OME': None}} // AmplificationGain 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.setAmplificationGain(amplificationGain); }
public void setDetectorLotNumber(String lotNumber, int instrumentIndex, int detectorIndex) { // Parents: {u'Instrument': {u'OME': None}} // LotNumber 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.setLotNumber(lotNumber); }
public void setDetectorModel(String model, int instrumentIndex, int detectorIndex) { // Parents: {u'Instrument': {u'OME': None}} // Model 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.setModel(model); }
public void setDetectorOffset(Double offset, int instrumentIndex, int detectorIndex) { // Parents: {u'Instrument': {u'OME': None}} // Offset 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.setOffset(offset); }
public void setFilterSerialNumber(String serialNumber, int instrumentIndex, int filterIndex) { // Parents: {u'Instrument': {u'OME': None}} // SerialNumber is not a reference OME o0 = root; if (o0.sizeOfInstrumentList() == instrumentIndex) { o0.addInstrument(new Instrument()); } Instrument o1 = o0.getInstrument(instrumentIndex); if (o1.sizeOfFilterList() == filterIndex) { o1.addFilter(new Filter()); } Filter o2 = o1.getFilter(filterIndex); o2.setSerialNumber(serialNumber); }
public void setFilterSetLotNumber(String lotNumber, int instrumentIndex, int filterSetIndex) { // Parents: {u'Instrument': {u'OME': None}} // LotNumber is not a reference OME o0 = root; if (o0.sizeOfInstrumentList() == instrumentIndex) { o0.addInstrument(new Instrument()); } Instrument o1 = o0.getInstrument(instrumentIndex); if (o1.sizeOfFilterSetList() == filterSetIndex) { o1.addFilterSet(new FilterSet()); } FilterSet o2 = o1.getFilterSet(filterSetIndex); o2.setLotNumber(lotNumber); }
public void setFilterSetModel(String model, int instrumentIndex, int filterSetIndex) { // Parents: {u'Instrument': {u'OME': None}} // Model is not a reference OME o0 = root; if (o0.sizeOfInstrumentList() == instrumentIndex) { o0.addInstrument(new Instrument()); } Instrument o1 = o0.getInstrument(instrumentIndex); if (o1.sizeOfFilterSetList() == filterSetIndex) { o1.addFilterSet(new FilterSet()); } FilterSet o2 = o1.getFilterSet(filterSetIndex); o2.setModel(model); }
public void setLaserPulse(Pulse pulse, int instrumentIndex, int lightSourceIndex) { // Parents: None // Pulse is not a reference OME o0 = root; if (o0.sizeOfInstrumentList() == instrumentIndex) { o0.addInstrument(new Instrument()); } Instrument o1 = o0.getInstrument(instrumentIndex); if (o1.sizeOfLightSourceList() == lightSourceIndex) { o1.addLightSource(new Laser()); } Laser o2 = (Laser) o1.getLightSource(lightSourceIndex); o2.setPulse(pulse); }
public void setLaserRepetitionRate(Frequency repetitionRate, int instrumentIndex, int lightSourceIndex) { // Parents: None // RepetitionRate is not a reference OME o0 = root; if (o0.sizeOfInstrumentList() == instrumentIndex) { o0.addInstrument(new Instrument()); } Instrument o1 = o0.getInstrument(instrumentIndex); if (o1.sizeOfLightSourceList() == lightSourceIndex) { o1.addLightSource(new Laser()); } Laser o2 = (Laser) o1.getLightSource(lightSourceIndex); o2.setRepetitionRate(repetitionRate); }
public void setMicroscopeManufacturer(String manufacturer, int instrumentIndex) { // Parents: {u'Instrument': {u'OME': None}} // Manufacturer is not a reference OME o0 = root; if (o0.sizeOfInstrumentList() == instrumentIndex) { o0.addInstrument(new Instrument()); } Instrument o1 = o0.getInstrument(instrumentIndex); if (o1.getMicroscope() == null) { o1.setMicroscope(new Microscope()); } Microscope o2 = o1.getMicroscope(); o2.setManufacturer(manufacturer); }
public void setMicroscopeSerialNumber(String serialNumber, int instrumentIndex) { // Parents: {u'Instrument': {u'OME': None}} // SerialNumber is not a reference OME o0 = root; if (o0.sizeOfInstrumentList() == instrumentIndex) { o0.addInstrument(new Instrument()); } Instrument o1 = o0.getInstrument(instrumentIndex); if (o1.getMicroscope() == null) { o1.setMicroscope(new Microscope()); } Microscope o2 = o1.getMicroscope(); o2.setSerialNumber(serialNumber); }
public void setObjectiveIris(Boolean iris, int instrumentIndex, int objectiveIndex) { // Parents: {u'Instrument': {u'OME': None}} // Iris is not a reference OME o0 = root; if (o0.sizeOfInstrumentList() == instrumentIndex) { o0.addInstrument(new Instrument()); } Instrument o1 = o0.getInstrument(instrumentIndex); if (o1.sizeOfObjectiveList() == objectiveIndex) { o1.addObjective(new Objective()); } Objective o2 = o1.getObjective(objectiveIndex); o2.setIris(iris); }
@BeforeClass public void setUp() throws Exception { metadata = new OMEXMLMetadataImpl(); OMEXMLMetadataRoot ome = new OMEXMLMetadataRoot(); Instrument instrument = new Instrument(); instrument.addLightSource(new Arc()); instrument.addLightSource(new Filament()); instrument.addLightSource(new Laser()); instrument.addLightSource(new LightEmittingDiode()); ome.addInstrument(instrument); metadata.setRoot(ome); }