See LocalJeevesMediator.java in the test framework how GN is started locally. The "trick" is to provide all the proper paths to configs. Hope this helps.
hi Maven,
I think your approach should work, although it sounds a bit unconventional, you're not really using GN as a library like that but just starting it as a separate application.
In the Bolsena meeting this spring Just van den Broecke has started to write a Junit extension "JeevesTestCase" which I think should contain code to set up the Jeeves application context without actually starting the GeoNetwork web application. It's not yet committed to trunk, but I've asked him to send me the code, if it's useful I'll pass it on to you here.
Kind regards
Heikki Doeleman
On Tue, Oct 27, 2009 at 11:09 PM, maven apache <apachemaven0@anonymised.com <mailto:apachemaven0@anonymised.com>> wrote:
2009/10/27 heikki <tropicano@anonymised.com <mailto:tropicano@anonymised.com>>
yes, I think it is not quite THAT easy as I sketched
I think you'll might have some difficulty also in setting up
things like the Jeeves application context, which normally is
set up when the GN web app starts. Although it should be
possible to do it from your app too, I think.
As for the operations accessible through the web : I think you
could do those operations by "forwarding" them from your own app
to GeoNetwork using a programmatic HTTP request from your Java
code. It may not be ideal but that may be the easiest way to go
forward now.
In future, we hope to have GeoNetwork more modularized, and so
make it more easy to use its component parts separately as a
library. For now I think you'll need some fiddling around as
sketched to get it to work.
Kind regards
Thank you very much for your detailed advise!!
So I have a idea but I am not sure it is right or not:
I copy all the files under the GN-roots/* to a directory in my
application,so when I run my application I also call a script {maybe
:java.lang.Runtime.exec("Myapplication/GN/bin/start-geonetwork.bat")}
to start the GN. Also I can add some interface in my application
to interact with the GN(CSW).
I wonder the idea is feasible or not?
Heikki Doeleman
On Tue, Oct 27, 2009 at 8:05 PM, maven apache
<apachemaven0@anonymised.com <mailto:apachemaven0@anonymised.com>> wrote:
2009/10/27 heikki <tropicano@anonymised.com
<mailto:tropicano@anonymised.com>>
hello Maven,
yes, it should be possible.
The way to do it should be to include geonetwork.jar in
your classpath and treat it like you would any other
library. There are probably some dependencies with other
jars that normally are in
<geonetwork-root>/web/geonetwork/WEB-INF/lib, just copy
those as well into your application's classpath.
Thanks for your reply. It seems to be easy. But I am afraid how to register ,query
and use the ows(ogc web service) urls.
Since with the independent geonetwork one can do the above
operation(register query) through a web manner,I am not
sure how to do it in my application.
Kind regards
Heikki Doeleman
On Tue, Oct 27, 2009 at 8:21 AM, maven apache
<apachemaven0@anonymised.com <mailto:apachemaven0@anonymised.com>>
wrote:
Hi:
I have another java swing application and I want to
use the geonetwork as a CSW instance.
For example in my application I have to register
some ows urls(http://www.example.org:8080/wcs) in a
config file,now I want to register them with a CSW
insance ,so I try to use geonetwork.
Here I have two problems:
1) Can I integrate the geonetwork into my application?
2) If the answer of the above is yes,so how to do?
That's to say how to install the geonetwork quietly
when I run the application
Anyone can give some advise?
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer
Conference in SF, CA
is the only developer event you need to attend this
year. Jumpstart your
developing skills, take BlackBerry mobile
applications to market and stay
ahead of the curve. Join us from November 9 - 12,
2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
<mailto:GeoNetwork-devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference
in SF, CA
is the only developer event you need to attend this year.
Jumpstart your
developing skills, take BlackBerry mobile applications to
market and stay
ahead of the curve. Join us from November 9 - 12, 2009.
Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
<mailto:GeoNetwork-devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and
stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
<mailto:GeoNetwork-devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork
------------------------------------------------------------------------
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
------------------------------------------------------------------------
_______________________________________________
GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork