Search in sources :

Example 16 with Annotation

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

the class InOutCurrentTest method testValidFilamentAnnotation.

@Test(dependsOnMethods = { "testValidFilamentNode" }, enabled = false)
public void testValidFilamentAnnotation() {
    Annotation n = ome.getInstrument(0).getLightSource(3).getLinkedAnnotation(0);
    assertNotNull(n);
    assertEquals(LIGHTSOURCE_FILAMENT_ANNOTATION_ID, n.getID());
    assertEquals(n.getNamespace(), GENERAL_ANNOTATION_NAMESPACE);
    assertTrue(n instanceof CommentAnnotation);
    CommentAnnotation string = (CommentAnnotation) n;
    assertEquals(LIGHTSOURCE_FILAMENT_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 17 with Annotation

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

the class InOutCurrentTest method testValidWellAnnotation.

@Test(dependsOnMethods = { "testValidWellSamples" })
public void testValidWellAnnotation() {
    Annotation n = ome.getPlate(0).getWell(0).getLinkedAnnotation(0);
    assertNotNull(n);
    assertEquals(WELL_ANNOTATION_ID, n.getID());
    assertEquals(n.getNamespace(), GENERAL_ANNOTATION_NAMESPACE);
    assertTrue(n instanceof LongAnnotation);
    LongAnnotation longAnnotation = (LongAnnotation) n;
    assertEquals(longAnnotation.getValue(), WELL_ANNOTATION_VALUE);
}
Also used : LongAnnotation(ome.xml.model.LongAnnotation) 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

Annotation (ome.xml.model.Annotation)17 XMLAnnotation (ome.xml.model.XMLAnnotation)17 Test (org.testng.annotations.Test)15 BooleanAnnotation (ome.xml.model.BooleanAnnotation)14 CommentAnnotation (ome.xml.model.CommentAnnotation)14 ListAnnotation (ome.xml.model.ListAnnotation)14 LongAnnotation (ome.xml.model.LongAnnotation)14 TimestampAnnotation (ome.xml.model.TimestampAnnotation)14 Image (ome.xml.model.Image)3 IOException (java.io.IOException)2 ParserConfigurationException (javax.xml.parsers.ParserConfigurationException)2 ModuloAnnotation (loci.formats.meta.ModuloAnnotation)2 OriginalMetadataAnnotation (loci.formats.meta.OriginalMetadataAnnotation)2 OMEXMLMetadataRoot (ome.xml.meta.OMEXMLMetadataRoot)2 Channel (ome.xml.model.Channel)2 Document (org.w3c.dom.Document)2 Node (org.w3c.dom.Node)2 NodeList (org.w3c.dom.NodeList)2 SAXException (org.xml.sax.SAXException)2 TransformerConfigurationException (javax.xml.transform.TransformerConfigurationException)1