[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sdx-users] [newbie] Programmatic use of SDX...
From: |
Pierrick Brihaye |
Subject: |
Re: [sdx-users] [newbie] Programmatic use of SDX... |
Date: |
Wed, 12 May 2004 12:41:05 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Win98; fr-FR; rv:1.6) Gecko/20040113 |
Hi,
Remi Vankeisbelck a écrit :
Notice that the link describes a deprecated architecture, SDX' one
though... Current design is described there :
http://avalon.apache.org/framework/api/org/apache/avalon/framework/service/ServiceManager.html
Looks even simpler :-)
But I'll have to read more to understand why it now handles "Objects"
instead of "Component"s...
I have to read and understand as well :-) It's been a pain for me to
understand COP design and those Avalon guys changed everything in the
meantime, huh !
Could you please use this occasion to provide a "standalone"
implementation ?
lol :-)
Definitely, since this is a recurrent need to SDX users. Yours will be
good starting point, for sure :-))
My only "problem" is that implementations of Avalon interfaces are
provided by cocoon... Looks like it's not gonna be so easy to get rid of
it !
:-)
More than you could think :
http://wiki.cocoondev.org/Wiki.jsp?page=DevelopingComponents
Moreover, even context-things are strongly relying on the Web App
context,
Not so suprising IMHO : it is an Apache project :-)
Anyway, in my simple "do a search using methods" example, I guess I
don't even need to put my hands there...
Just a little ; all you have to do is to :
1) build a query :
http://www.nongnu.org/sdx/docs/html/doc-sdx2/apidocs/fr/gouv/culture/sdx/search/lucene/query/AbstractQuery.html#AbstractQuery()
2) set it up
http://www.nongnu.org/sdx/docs/html/doc-sdx2/apidocs/fr/gouv/culture/sdx/search/lucene/query/AbstractQuery.html#setUp(fr.gouv.culture.sdx.search.lucene.query.SearchLocations,%20org.apache.lucene.search.Query)
3) execute it :
http://www.nongnu.org/sdx/docs/html/doc-sdx2/apidocs/fr/gouv/culture/sdx/search/lucene/query/AbstractQuery.html#AbstractQuery()
4) do what you want with the results :
http://www.nongnu.org/sdx/docs/html/doc-sdx2/apidocs/fr/gouv/culture/sdx/search/lucene/query/Results.html
5) ... especially with the documents' IDs :
http://www.nongnu.org/sdx/docs/html/doc-sdx2/apidocs/fr/gouv/culture/sdx/search/lucene/query/Results.html
6) and it you want a document, just ask it to the DocumentBase :
http://www.nongnu.org/sdx/docs/html/doc-sdx2/apidocs/fr/gouv/culture/sdx/documentbase/DocumentBase.html#getDocument(fr.gouv.culture.sdx.document.Document)
Actually, I think my only "problem" now would be to provide a
ServletContext to a "standalone" app :-)
No. The needed context is a
org.apache.avalon.framework.context.DefaultContext
(http://avalon.apache.org/framework/api/org/apache/avalon/framework/context/Context.html),
not a javax.servlet.ServletContext. It would be up to your "root class"
to provide this context.
Actually, I wouldn't have no problems with cocoon if XSLT was not an
HTTP only thing :-)
:-)
Well, it's been a real pleasure to have this talk ! You really explained
everything very well, that's far beyond most of the support I could find
even for commercial products ! I think I can now investigate the rest of
SDX by myself and stop bothering you with my philosophical
considerations :-)
They were welcome. A "standalone" SDX would be a great step forward, at
least for one reason : provide a real test suite :-)
Cheers,
--
Pierrick Brihaye, informaticien
Service régional de l'Inventaire
DRAC Bretagne
mailto:address@hidden
+33 (0)2 99 29 67 78
- RE : [sdx-users] mysql class not found, (continued)
- Re: [sdx-users] Répertoires temporaires, Martin Sevigny, 2004/05/12
- Re: [sdx-users] Répertoires temporaires, Malo Pichot, 2004/05/12
- RE: [sdx-users] Répertoires temporaires, Emmanuel Bégué, 2004/05/12
- RE : [sdx-users] Répertoires temporaires, Rasik Pandey, 2004/05/12
- RE: RE : [sdx-users] Répertoires temporaires, Emmanuel Bégué, 2004/05/12
- Re: RE : [sdx-users] Répertoires temporaires, Pierrick Brihaye, 2004/05/12
- Re: [sdx-users] [newbie] Programmatic use of SDX..., Pierrick Brihaye, 2004/05/11
- Re: [sdx-users] [newbie] Programmatic use of SDX..., Remi Vankeisbelck, 2004/05/12
- Re: [sdx-users] [newbie] Programmatic use of SDX...,
Pierrick Brihaye <=
- [sdx-users] adnx.org, Emmanuel Bégué, 2004/05/12
- Re: [sdx-users] adnx.org, Michel Bottin, 2004/05/12