Adding items directly to the map or through the map's factories by specifying a start and end position works for simple annotations. For more complex annotations, classes that implement the interface NeoDataAdapterI provide a more general mechanism to represent data models on the map. However, making a data adapter class requires knowledge of both the data model one wants to represent and more of the internals of the map widget.
Data Adapters can be used to automate building a visual representation of datamodels. Each data adapter is specific to a particular class of data model. Once a data adapter has been constructed and added to the map, calling Map.addData(model) will represent the model in the map in a manner specific to the data adapter and its configuration.
A ScoredAnnotation models a scored annotation. It extends an Annotation. It can be constructed by giving it a start, an end, and a score between 0 and 1 inclusive.
A ScoredAnnotAdapter uses the score of an annotation to determine a grayscale value to color the glyph representing it. Unless told otherwise, it assumes a scoring system that ranges from 0.0 to 1.0, and maps this along a linear color scale, from 0.0 = black to 1.0 = white. Values outside this range will give unpredictable results.