some tools useful when working with COMBINE stuff
The CombineIconizer maintains a list of icon collections which provide icons for certain file formatas, see List<IconCollection> iconCollectionsList
in /src/main/java/de/unirostock/sems/cbext/Iconizer.java
Iconizer.addIconCollection (IconCollection collection)
IconCollection
class, see /src/main/java/de/unirostock/sems/cbext/IconCollection.java
/src/main/java/de/unirostock/sems/cbext/collections/DefaultIconCollection.java
Iconizer.removeCollections ()
Iconizer.addDefaultCollection ()
The abstract class has 4 functions that you need to implement:
int getPriority ()
must return a positive priority. Default icon collections have a priority of 100. Icon collections with a higher priority are asked first for an icon. The first who provides an icon given a format wins this competition.URL formatToIconUrl (URI format)
you’ll get a format and you’re asked to return the URL to an iconInputStream formatToIconStream (URI format)
you’ll get a format and you’re asked to return a stream delivering the iconString formatToIconName (URI format)
you’ll get a format and you’re asked to return the icon’s name. That’s useful if the client has the icons somewhere else unpacked (e.g. for web servers etc.)
null
and the next icon collection will be askedAn example of an extension can be found at PharmMLRecognizer There the Iconizer was extended to also deliver a PharmML icon.