You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Thorsten Scherler <th...@apache.org> on 2005/07/14 20:49:13 UTC
Locationmap API and java
Hi devs,
I 'promoted' the locationmap over in lenya and some questions caught me
red handed:
> > <map:read src="{lm:resources/shared/css/{3}.css}"
>
> How would that be used from Java classes?
>
> Like I would use sourceResolver.resolveURI("fallback://..."),
> is there a Java API for LocationMaps, or is it accessible as an
> InputModule only?
Maybe somebody can help me out here. I am still only looking at the
classes and not into them. ;-)
...and
> Another point: How would loops be implemented?
> You have a chain of parents. Is it possible to use recursion?
Would be nice if somebody can explain it to us that I and Andreas can
understand it better.
BTW the thread starts here
http://mail-archives.apache.org/mod_mbox/lenya-dev/200507.mbox/%
3c42D1943F.5060402@wyona.com%3e
and the questions raises here:
http://mail-archives.apache.org/mod_mbox/lenya-dev/200507.mbox/%
3c42D68DB5.1030300@apache.org%3e
TIA
--
thorsten
"Together we stand, divided we fall!"
Hey you (Pink Floyd)
Re: Locationmap API and java
Posted by Unico Hommes <un...@apache.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Thorsten,
Thorsten Scherler wrote:
> Hi devs,
>
> I 'promoted' the locationmap over in lenya and some questions caught me
> red handed:
>
>
>>><map:read src="{lm:resources/shared/css/{3}.css}"
>>
>>How would that be used from Java classes?
>>
>>Like I would use sourceResolver.resolveURI("fallback://..."),
>>is there a Java API for LocationMaps, or is it accessible as an
>>InputModule only?
No LocationMap API no, the functionality is only available as an
InputModule, wich is in fact an API itself so should be no problem there.
InputModule lmm = (InputModule) m_manager.lookup(InputModule.ROLE +
"/locationmap");
String location = lmm.getVariable(moduleString, null, objectModel);
>
>
> Maybe somebody can help me out here. I am still only looking at the
> classes and not into them. ;-)
>
> ...and
>
>>Another point: How would loops be implemented?
>>You have a chain of parents. Is it possible to use recursion?
If you implement a locationmap source protocol you get recursion for
free. Continuing with the example code above:
Source s = sourceResolver.resolveURI(location);
s of course could be a LocationMapSource itself.
- --
Unico
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)
iD8DBQFC17MAcuec8tVNKAwRAoNxAJ4mGyHTSP8x6TqDvsb1biVKKzjNPgCghkZM
d3nL6HCuJsOUjeTxf+ocHYo=
=hH+5
-----END PGP SIGNATURE-----
Re: Locationmap API and java
Posted by Ross Gardler <rg...@apache.org>.
Thorsten Scherler wrote:
> Hi devs,
>
> I 'promoted' the locationmap over in lenya and some questions caught me
> red handed:
>
>
>>><map:read src="{lm:resources/shared/css/{3}.css}"
>>
>>How would that be used from Java classes?
>>
>>Like I would use sourceResolver.resolveURI("fallback://..."),
>>is there a Java API for LocationMaps, or is it accessible as an
>>InputModule only?
>
>
> Maybe somebody can help me out here. I am still only looking at the
> classes and not into them. ;-)
I'm a little deeper into the classes but I'm not swimming freely yet. My
hint to you is search for methods called "locate".
> ...and
>
>>Another point: How would loops be implemented?
>>You have a chain of parents. Is it possible to use recursion?
>
>
> Would be nice if somebody can explain it to us that I and Andreas can
> understand it better.
I've read the whole thread, but I'm missing too much context to
understand the use case. Why would one want recursion?
Ross