Search in sources :

Example 1 with CommentAnnotation

use of ome.xml.model.CommentAnnotation in project bioformats by openmicroscopy.

the class InOutCurrentTest method testValidInstrumentAnnotation.

@Test(dependsOnMethods = { "testValidInstrumentNode" })
public void testValidInstrumentAnnotation() {
    Annotation n = ome.getInstrument(0).getLinkedAnnotation(0);
    assertNotNull(n);
    assertEquals(INSTRUMENT_ANNOTATION_ID, n.getID());
    assertEquals(n.getNamespace(), GENERAL_ANNOTATION_NAMESPACE);
    assertTrue(n instanceof CommentAnnotation);
    CommentAnnotation string = (CommentAnnotation) n;
    assertEquals(INSTRUMENT_ANNOTATION_VALUE, string.getValue());
}
Also used : CommentAnnotation(ome.xml.model.CommentAnnotation) ListAnnotation(ome.xml.model.ListAnnotation) CommentAnnotation(ome.xml.model.CommentAnnotation) Annotation(ome.xml.model.Annotation) LongAnnotation(ome.xml.model.LongAnnotation) TimestampAnnotation(ome.xml.model.TimestampAnnotation) XMLAnnotation(ome.xml.model.XMLAnnotation) BooleanAnnotation(ome.xml.model.BooleanAnnotation) Test(org.testng.annotations.Test)

Example 2 with CommentAnnotation

use of ome.xml.model.CommentAnnotation in project bioformats by openmicroscopy.

the class InOutCurrentTest method testValidROIAnnotation.

@Test(dependsOnMethods = { "testValidROINode" })
public void testValidROIAnnotation() {
    Annotation n = ome.getROI(0).getLinkedAnnotation(0);
    assertNotNull(n);
    assertEquals(ROI_ANNOTATION_ID, n.getID());
    assertEquals(n.getNamespace(), GENERAL_ANNOTATION_NAMESPACE);
    assertTrue(n instanceof CommentAnnotation);
    CommentAnnotation string = (CommentAnnotation) n;
    assertEquals(ROI_ANNOTATION_VALUE, string.getValue());
}
Also used : CommentAnnotation(ome.xml.model.CommentAnnotation) ListAnnotation(ome.xml.model.ListAnnotation) CommentAnnotation(ome.xml.model.CommentAnnotation) Annotation(ome.xml.model.Annotation) LongAnnotation(ome.xml.model.LongAnnotation) TimestampAnnotation(ome.xml.model.TimestampAnnotation) XMLAnnotation(ome.xml.model.XMLAnnotation) BooleanAnnotation(ome.xml.model.BooleanAnnotation) Test(org.testng.annotations.Test)

Example 3 with CommentAnnotation

use of ome.xml.model.CommentAnnotation in project bioformats by openmicroscopy.

the class InOutCurrentTest method testValidDichroicAnnotation.

@Test(dependsOnMethods = { "testValidDichroicNode" })
public void testValidDichroicAnnotation() {
    Annotation n = ome.getInstrument(0).getDichroic(0).getLinkedAnnotation(0);
    assertNotNull(n);
    assertEquals(DICHROIC_ANNOTATION_ID, n.getID());
    assertEquals(n.getNamespace(), GENERAL_ANNOTATION_NAMESPACE);
    assertTrue(n instanceof CommentAnnotation);
    CommentAnnotation string = (CommentAnnotation) n;
    assertEquals(DICHROIC_ANNOTATION_VALUE, string.getValue());
}
Also used : CommentAnnotation(ome.xml.model.CommentAnnotation) ListAnnotation(ome.xml.model.ListAnnotation) CommentAnnotation(ome.xml.model.CommentAnnotation) Annotation(ome.xml.model.Annotation) LongAnnotation(ome.xml.model.LongAnnotation) TimestampAnnotation(ome.xml.model.TimestampAnnotation) XMLAnnotation(ome.xml.model.XMLAnnotation) BooleanAnnotation(ome.xml.model.BooleanAnnotation) Test(org.testng.annotations.Test)

Example 4 with CommentAnnotation

use of ome.xml.model.CommentAnnotation in project bioformats by openmicroscopy.

the class InOutCurrentTest method testValidArcAnnotation.

@Test(dependsOnMethods = { "testValidArcNode" }, enabled = false)
public void testValidArcAnnotation() {
    Annotation n = ome.getInstrument(0).getLightSource(2).getLinkedAnnotation(0);
    assertNotNull(n);
    assertEquals(LIGHTSOURCE_ARC_ANNOTATION_ID, n.getID());
    assertEquals(n.getNamespace(), GENERAL_ANNOTATION_NAMESPACE);
    assertTrue(n instanceof CommentAnnotation);
    CommentAnnotation string = (CommentAnnotation) n;
    assertEquals(LIGHTSOURCE_ARC_ANNOTATION_VALUE, string.getValue());
}
Also used : CommentAnnotation(ome.xml.model.CommentAnnotation) ListAnnotation(ome.xml.model.ListAnnotation) CommentAnnotation(ome.xml.model.CommentAnnotation) Annotation(ome.xml.model.Annotation) LongAnnotation(ome.xml.model.LongAnnotation) TimestampAnnotation(ome.xml.model.TimestampAnnotation) XMLAnnotation(ome.xml.model.XMLAnnotation) BooleanAnnotation(ome.xml.model.BooleanAnnotation) Test(org.testng.annotations.Test)

Example 5 with CommentAnnotation

use of ome.xml.model.CommentAnnotation in project bioformats by openmicroscopy.

the class InOutCurrentTest method testValidLightEmittingDiodeAnnotation.

@Test(dependsOnMethods = { "testValidLightEmittingDiodeNode" }, enabled = false)
public void testValidLightEmittingDiodeAnnotation() {
    LightEmittingDiode led = (LightEmittingDiode) ome.getInstrument(0).getLightSource(4);
    Annotation n = led.getLinkedAnnotation(0);
    assertNotNull(n);
    assertEquals(LIGHTSOURCE_LED_ANNOTATION_ID, n.getID());
    assertEquals(n.getNamespace(), GENERAL_ANNOTATION_NAMESPACE);
    assertTrue(n instanceof CommentAnnotation);
    CommentAnnotation string = (CommentAnnotation) n;
    assertEquals(LIGHTSOURCE_LED_ANNOTATION_VALUE, string.getValue());
}
Also used : LightEmittingDiode(ome.xml.model.LightEmittingDiode) CommentAnnotation(ome.xml.model.CommentAnnotation) ListAnnotation(ome.xml.model.ListAnnotation) CommentAnnotation(ome.xml.model.CommentAnnotation) Annotation(ome.xml.model.Annotation) LongAnnotation(ome.xml.model.LongAnnotation) TimestampAnnotation(ome.xml.model.TimestampAnnotation) XMLAnnotation(ome.xml.model.XMLAnnotation) BooleanAnnotation(ome.xml.model.BooleanAnnotation) Test(org.testng.annotations.Test)

Aggregations

CommentAnnotation (ome.xml.model.CommentAnnotation)14 Test (org.testng.annotations.Test)11 Annotation (ome.xml.model.Annotation)10 BooleanAnnotation (ome.xml.model.BooleanAnnotation)10 ListAnnotation (ome.xml.model.ListAnnotation)10 LongAnnotation (ome.xml.model.LongAnnotation)10 TimestampAnnotation (ome.xml.model.TimestampAnnotation)10 XMLAnnotation (ome.xml.model.XMLAnnotation)10 Image (ome.xml.model.Image)2 Instrument (ome.xml.model.Instrument)2 LightEmittingDiode (ome.xml.model.LightEmittingDiode)2 Power (ome.units.quantity.Power)1 Arc (ome.xml.model.Arc)1 BinData (ome.xml.model.BinData)1 Channel (ome.xml.model.Channel)1 Detector (ome.xml.model.Detector)1 Dichroic (ome.xml.model.Dichroic)1 Filament (ome.xml.model.Filament)1 Filter (ome.xml.model.Filter)1 FilterSet (ome.xml.model.FilterSet)1