blob: c6ab4d44553d718e9c5bc8476c69361d1a14e41e [file]
<bundle:///imagereaderservice-content-el/0-content> <http://discobits.org/ontology#infoBit> "<p xmlns=\"http://www.w3.org/1999/xhtml\">\nBy default the Clerezza Platform uses javax.imageio to read image data. However there are at least two scenarios when users may want to change that. \n</p>\n<ol xmlns=\"http://www.w3.org/1999/xhtml\">\n<li>When reading images that ImageIO does not support (different image formats or image formats that may be considered corrupt by ImageIO)</li>\n<li>When wanting to improve image processing performance.</li>\n</ol>\n<p xmlns=\"http://www.w3.org/1999/xhtml\">\nA major difficulty in resolving these problems is that normally there is no way other than changing source code and recompiling to make existing services use a different method of reading images. With the introduction of the ImageReaderService all Clerezza Platform components have been changed to use the ImageReaderService when obtaining BufferedImages. This service dynamically looks up services that implement the ImageReader interface in the OSGi SCR (Service Component Runtime) and provides the service that is registered with the highest service.ranking property. By default the Clerezza Platform has only one ImageReader service registered that has a service ranking of 0 and reads images using javax.imageio. The ImageReaderService implement the ImageReader interface as well but delegates all calls to the highest ranking registered ImageReader.\n</p>"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
<bundle:///imagereaderservice-content-el/0-content> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
<bundle:///imagereaderservice-content-el/0-title> <http://discobits.org/ontology#infoBit> "Purpose"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
<bundle:///imagereaderservice-content-el/0-title> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
<bundle:///imagereaderservice-content-el/0> <http://discobits.org/ontology#contains> _:4b64ff6a77a56372db068a4fddf5c63f1 .
<bundle:///imagereaderservice-content-el/0> <http://discobits.org/ontology#contains> _:bbe771ce6fc4d98bd5237362886bf4fd1 .
<bundle:///imagereaderservice-content-el/0> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#OrderedContent> .
<bundle:///imagereaderservice-content-el/0> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#TitledContent> .
<bundle:///imagereaderservice-content-el/2-content> <http://discobits.org/ontology#infoBit> "<p xmlns=\"http://www.w3.org/1999/xhtml\">\nYou can bind the ImageReaderService in an OSGi component by referencing it:\n</p>\n\n<div xmlns=\"http://www.w3.org/1999/xhtml\" class=\"tx-blockcode\"><pre>\n@Reference\nprivate ImageReaderService imageReaderService;\n</pre></div>\n\n<p xmlns=\"http://www.w3.org/1999/xhtml\">\nThen you can either call the getImageReader() method to obtain the highest ranking ImageReader registered or use one of the getBufferedImage methods that will delegate to the highest ranking ImageReader.\n</p>\n"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
<bundle:///imagereaderservice-content-el/2-content> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
<bundle:///imagereaderservice-content-el/2-title> <http://discobits.org/ontology#infoBit> "How to use the ImageReaderService"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
<bundle:///imagereaderservice-content-el/2-title> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
<bundle:///imagereaderservice-content-el/2> <http://discobits.org/ontology#contains> _:642314d573fc67ec874277a733625c7e1 .
<bundle:///imagereaderservice-content-el/2> <http://discobits.org/ontology#contains> _:7b16f9f9228635bad0153ac9489b0c4c1 .
<bundle:///imagereaderservice-content-el/2> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#TitledContent> .
<bundle:///imagereaderservice-content-el/3-content> <http://discobits.org/ontology#infoBit> "<p xmlns=\"http://www.w3.org/1999/xhtml\">\nTo register a custom ImageReader with service ranking of 1 (default is 0) you need to create a bundle providing an ImageReader service as follows:\n</p>\n\n<div xmlns=\"http://www.w3.org/1999/xhtml\" class=\"tx-blockcode\"><pre>\n@Component\n@Service(ImageReader.class)\n@Property(name=Constants.SERVICE_RANKING, intValue=1)\npublic class BetterImageReader implements ImageReader {\n // ...\n}\n</pre></div>\n\n<p xmlns=\"http://www.w3.org/1999/xhtml\">\nWhen the component metaType is declared true and the service.ranking property is declared non-private, the service.ranking can by dynamically configured at runtime in the Felix Web Console.\n</p>\n\n<div xmlns=\"http://www.w3.org/1999/xhtml\" class=\"tx-blockcode\"><pre>\n@Component(metatype=true)\n@Service(ImageReader.class)\n@Property(name=Constants.SERVICE_RANKING, intValue=1, propertyPrivate=false)\npublic class BetterImageReader implements ImageReader {\n // ...\n}</pre></div>"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
<bundle:///imagereaderservice-content-el/3-content> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
<bundle:///imagereaderservice-content-el/3-title> <http://discobits.org/ontology#infoBit> "How to register a custom ImageRead"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
<bundle:///imagereaderservice-content-el/3-title> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
<bundle:///imagereaderservice-content-el/3> <http://discobits.org/ontology#contains> _:d81701dae2f3aed1a5f29b45e42f5e591 .
<bundle:///imagereaderservice-content-el/3> <http://discobits.org/ontology#contains> _:e55c30e77e21a55e0bae2869c89d81971 .
<bundle:///imagereaderservice-content-el/3> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#TitledContent> .
<bundle:///imagereaderservice-content> <http://discobits.org/ontology#contains> _:81b3626dcd0868725af4ab6b80b893ec1 .
<bundle:///imagereaderservice-content> <http://discobits.org/ontology#contains> _:debcebb0668a11f9d38584d92d7cbe5d1 .
<bundle:///imagereaderservice-content> <http://discobits.org/ontology#contains> _:e0435f3304c56e95010f5a481660c2991 .
<bundle:///imagereaderservice-content> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#OrderedContent> .
<bundle:///imagereaderservice-title> <http://discobits.org/ontology#infoBit> "Image Reader Service"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
<bundle:///imagereaderservice-title> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
<bundle:///imagereaderservice> <http://discobits.org/ontology#contains> _:0c01b54f6d7897c4b59db78e9fb54d501 .
<bundle:///imagereaderservice> <http://discobits.org/ontology#contains> _:2df78addc6385ad01bdb37f93f74a4b21 .
<bundle:///imagereaderservice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#TitledContent> .
_:0c01b54f6d7897c4b59db78e9fb54d501 <http://discobits.org/ontology#holds> <bundle:///imagereaderservice-content> .
_:0c01b54f6d7897c4b59db78e9fb54d501 <http://discobits.org/ontology#pos> "1" .
_:0c01b54f6d7897c4b59db78e9fb54d501 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
_:2df78addc6385ad01bdb37f93f74a4b21 <http://discobits.org/ontology#holds> <bundle:///imagereaderservice-title> .
_:2df78addc6385ad01bdb37f93f74a4b21 <http://discobits.org/ontology#pos> "0" .
_:2df78addc6385ad01bdb37f93f74a4b21 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
_:4b64ff6a77a56372db068a4fddf5c63f1 <http://discobits.org/ontology#holds> <bundle:///imagereaderservice-content-el/0-title> .
_:4b64ff6a77a56372db068a4fddf5c63f1 <http://discobits.org/ontology#pos> "0" .
_:4b64ff6a77a56372db068a4fddf5c63f1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
_:642314d573fc67ec874277a733625c7e1 <http://discobits.org/ontology#holds> <bundle:///imagereaderservice-content-el/2-title> .
_:642314d573fc67ec874277a733625c7e1 <http://discobits.org/ontology#pos> "0" .
_:642314d573fc67ec874277a733625c7e1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
_:7b16f9f9228635bad0153ac9489b0c4c1 <http://discobits.org/ontology#holds> <bundle:///imagereaderservice-content-el/2-content> .
_:7b16f9f9228635bad0153ac9489b0c4c1 <http://discobits.org/ontology#pos> "1" .
_:7b16f9f9228635bad0153ac9489b0c4c1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
_:81b3626dcd0868725af4ab6b80b893ec1 <http://discobits.org/ontology#holds> <bundle:///imagereaderservice-content-el/2> .
_:81b3626dcd0868725af4ab6b80b893ec1 <http://discobits.org/ontology#pos> "1" .
_:81b3626dcd0868725af4ab6b80b893ec1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
_:bbe771ce6fc4d98bd5237362886bf4fd1 <http://discobits.org/ontology#holds> <bundle:///imagereaderservice-content-el/0-content> .
_:bbe771ce6fc4d98bd5237362886bf4fd1 <http://discobits.org/ontology#pos> "1" .
_:bbe771ce6fc4d98bd5237362886bf4fd1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
_:d81701dae2f3aed1a5f29b45e42f5e591 <http://discobits.org/ontology#holds> <bundle:///imagereaderservice-content-el/3-content> .
_:d81701dae2f3aed1a5f29b45e42f5e591 <http://discobits.org/ontology#pos> "1" .
_:d81701dae2f3aed1a5f29b45e42f5e591 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
_:debcebb0668a11f9d38584d92d7cbe5d1 <http://discobits.org/ontology#holds> <bundle:///imagereaderservice-content-el/3> .
_:debcebb0668a11f9d38584d92d7cbe5d1 <http://discobits.org/ontology#pos> "2" .
_:debcebb0668a11f9d38584d92d7cbe5d1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
_:e0435f3304c56e95010f5a481660c2991 <http://discobits.org/ontology#holds> <bundle:///imagereaderservice-content-el/0> .
_:e0435f3304c56e95010f5a481660c2991 <http://discobits.org/ontology#pos> "0" .
_:e0435f3304c56e95010f5a481660c2991 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
_:e55c30e77e21a55e0bae2869c89d81971 <http://discobits.org/ontology#holds> <bundle:///imagereaderservice-content-el/3-title> .
_:e55c30e77e21a55e0bae2869c89d81971 <http://discobits.org/ontology#pos> "0" .
_:e55c30e77e21a55e0bae2869c89d81971 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .