You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Michael Mosmann <mi...@vergleich.de> on 2006/08/01 08:33:44 UTC

Transcoder - image tag data from memory

Hi,

i have a implementation of an interface with method
"getContentForPath(path)".

Now i could set a ParsedURLProtocolHandler for a custom protocol. But if
i have 2 or more different implementations in one jvm this will not
work, because AFAIK i can set this only in a global way.

Sure i could set a different protocol per implementation, but there are
also some limitations.

What i need is something like an ParsedURLProtocolHandler for an
SAXSVGDocumentFactory instance. So i can decide for each document, if i
get references from cache, memory, different file spaces and so on.


I dont know if i got the concept right. Maybe i look in the wrong
direction.


thank you



---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Re: [java] Re: Transcoder - image tag data from memory

Posted by Michael Mosmann <mi...@mosmann.de>.
Am Dienstag, den 01.08.2006, 05:47 -0400 schrieb
thomas.deweese@kodak.com:
> Hi Michael,
> 
> Michael Mosmann <mi...@vergleich.de> wrote on 08/01/2006 
> 02:33:44 AM:
> 
> > What i need is something like an ParsedURLProtocolHandler for an
> > SAXSVGDocumentFactory instance. So i can decide for each document, if i
> > get references from cache, memory, different file spaces and so on.
> 
>    If you only need this for SVG documents the easiest way to do it
> would be to provide a custom subclass of batik.bridge.DocumentLoader.
> This is the class that is used to load and cache SVG documents.

I need this for images and svg, so i think DocumentLoader is not enough.

>    You get to provide an instance in a number of different places.
> Since I'm not sure where/how you are using Batik I can't say how
> you would do it.

I try to explain it in a short way:

I have a content store where templates, svg files and images are
organized. This content store is connected to some database, filesystem
or webservice. You can not say which one. But you can get content out of
this with getContent(path).

When someone calls http://myserver/servlet/this/is/content.jpg my app
trys to call getContent with this/is/content.vm (Velocity Macro),
content.svg (SVG), content.jpg.

The first hit wins, so if my app get some SVG content, he look for an
engine to transform svg to jpg.

This transforming engine is the point where i am using batik.

I hope, this will explain a little bit.

Thanx for your help anyway:)

mm:)




---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Re: Transcoder - image tag data from memory

Posted by th...@kodak.com.
Hi Michael,

Michael Mosmann <mi...@vergleich.de> wrote on 08/01/2006 
02:33:44 AM:

> What i need is something like an ParsedURLProtocolHandler for an
> SAXSVGDocumentFactory instance. So i can decide for each document, if i
> get references from cache, memory, different file spaces and so on.

   If you only need this for SVG documents the easiest way to do it
would be to provide a custom subclass of batik.bridge.DocumentLoader.
This is the class that is used to load and cache SVG documents.

   You get to provide an instance in a number of different places.
Since I'm not sure where/how you are using Batik I can't say how
you would do it.

> I dont know if i got the concept right. Maybe i look in the wrong
> direction.


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org