[GeoNetwork-devel] CSW Request, getRecords, define own outputSchema?

Hello,
i have a question regarding the outputSchema when sending a getRecords
request in Geonetwork CSW Demo Requests.

There are already defined certain outputSchemas like "csw-IsoRecord and this
is working great. But now i would like to include some more outputSchemas,
which are defined by myself. if i understand it correctly, there is already
a placeholder called outputSchema:own for this case.

But there is the problem. How do I implement such a own outputSchema in
GeoNetwork. Unfortunately, i didn't find an instruction or a how to guide to
this case.

Can someone help me with this problem. Thanks in advance.

regards

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/CSW-Request-getRecords-define-own-outputSchema-tp5015911.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.

Hi Steffen

For 2.8.x and trunk at least, you can check about these files/classes to change:

  1. xml/csw/capabilities.xml, xml/csw/capabilities-inspire.xml: define your outputschema

  2. org.fao.geonet.csw.common.OutputSchema: modify parse method to support your output schema

  3. org.fao.geonet.kernel.csw.services.getrecords.SearchController: See applyElementSetName method

if (outputSchema == OutputSchema.OGC_CORE) {
prefix = “ogc”;
}
else if (outputSchema == OutputSchema.ISO_PROFILE) {
prefix = “iso”;
}
else if (outputSchema == OutputSchema.YOUROUTPUTSCHEMA) {
prefix = “XX”; // the value you want to use as a prefix
}

you need to create also in schema_plugins/YOURPROFILE/present/csw create the files for brief, full and summary representations: XX-brief.xsl, XX-full.xsl and XX-summary.xsl (XX prefix should be the same value as in previous java code)

Hopefully this should be improved in plugin profiles to avoid java code changes in the future when adding a new outputschema.

Regards,
Jose García

On Tue, Nov 13, 2012 at 11:25 AM, user_osgeo <steffen.schwarz85@anonymised.com275…> wrote:

Hello,
i have a question regarding the outputSchema when sending a getRecords
request in Geonetwork CSW Demo Requests.

There are already defined certain outputSchemas like "csw-IsoRecord and this
is working great. But now i would like to include some more outputSchemas,
which are defined by myself. if i understand it correctly, there is already
a placeholder called outputSchema:own for this case.

But there is the problem. How do I implement such a own outputSchema in
GeoNetwork. Unfortunately, i didn’t find an instruction or a how to guide to
this case.

Can someone help me with this problem. Thanks in advance.

regards


View this message in context: http://osgeo-org.1560.n6.nabble.com/CSW-Request-getRecords-define-own-outputSchema-tp5015911.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.


Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov


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


GeoCat Bridge for ArcGIS allows instant publishing of data and metadata on GeoServer and GeoNetwork. Visit http://geocat.net for details.


Jose García
GeoCat bv
Veenderweg 13
6721 WD Bennekom
The Netherlands
http://GeoCat.net

Hi,
thanks for your answer. Before i try, i have one question. are you sure, you
mean version 2.8.x at least for geonetwork?

I only found version 2.6.x published on geonetwork homepage. i have
installed the newest stable version (2.6.4).

is this version ok, too or should i install a trunk version?

thanks

regards

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/CSW-Request-getRecords-define-own-outputSchema-tp5015911p5015921.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.

Hi

I mean that I checked the code in trunk and requires the changes I put, but not sure if for 2.6.x are the same changes. Most probably yes, except that schemas are inside xml/schemas folder instead.

Regards,
Jose García

On Tue, Nov 13, 2012 at 12:12 PM, user_osgeo <steffen.schwarz85@anonymised.com> wrote:

Hi,
thanks for your answer. Before i try, i have one question. are you sure, you
mean version 2.8.x at least for geonetwork?

I only found version 2.6.x published on geonetwork homepage. i have
installed the newest stable version (2.6.4).

is this version ok, too or should i install a trunk version?

thanks

regards


View this message in context: http://osgeo-org.1560.n6.nabble.com/CSW-Request-getRecords-define-own-outputSchema-tp5015911p5015921.html

Sent from the GeoNetwork developer mailing list archive at Nabble.com.


Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov


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


GeoCat Bridge for ArcGIS allows instant publishing of data and metadata on GeoServer and GeoNetwork. Visit http://geocat.net for details.


Jose García
GeoCat bv
Veenderweg 13
6721 WD Bennekom
The Netherlands
http://GeoCat.net

Hi,
in order to edit the java code and compile the project i started to
implement the geonetwork trunk in eclipse.

To do this, I did the steps in this instruction
http://geonetwork-opensource.org/manuals/2.6.4/eng/developer/development/index.html
<http://geonetwork-opensource.org/manuals/2.6.4/eng/developer/development/index.html&gt;

But now i have a problem. In the appendix you see a screenshot made of
eclipse (Eclipse Java EE IDE for Web Developers installed). in Project
Explorer there are the geonetwork packages with still some errors.

What can I do to finally launch geonetwork in eclipse.

Thanks in advance

regards <http://osgeo-org.1560.n6.nabble.com/file/n5016233/Unbenannt.png&gt;

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/CSW-Request-getRecords-define-own-outputSchema-tp5015911p5016233.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.

Hi,
i solved the problem. For all, who have the same problem here is the
solution:

besides the errors regarding some jar libraries (which can be solved by
setting the correct path or download missing libraries) there was still an
error regarding the dbms and dbmspool java class.

solve the dbms pool error: instead of getting the trunk version of
geonetwork in svn i downloaded the code for the 2.6.x branch version. here
the java classes for dbms pool are a bit different. after implementing this
version in eclipse there were only some errors regarding some jar
librariers. as i mentioned above, this errors can be solved by setting the
right path.

next step is setting the right xslt parser. as default, the xalan parser is
used. for development mode, the saxon parser needs to be used. by setting
the saxon parser as default ("net.sf.saxon.TransformerFactoryImpl" in
transformerfactoryfactory.java) this problem can be solved, too.

after that, geonetwork should start in eclipse.

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/CSW-Request-getRecords-define-own-outputSchema-tp5015911p5016516.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.

FYI:

svn has no longer been the repository for some time now - it is still
mentioned as the repository on the geonetwork web site however this is
incorrect and should be corrected. Check out the following for information
on using git (the current repository).

HowToWorkWithGit <http://trac.osgeo.org/geonetwork/wiki/HowToWorkWithGit&gt;
HowToCompile <http://trac.osgeo.org/geonetwork/wiki/HowToCompile&gt;

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/CSW-Request-getRecords-define-own-outputSchema-tp5015911p5016591.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.

oh, thanks for the info. good to know :slight_smile:

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/CSW-Request-getRecords-define-own-outputSchema-tp5015911p5016601.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.

Hi,
let's go back to the main topic of this thread :-).

i tried to define a new schema output type. for testing i just copied the
iso19139 schema and renamed the folder. after adjusting the source code with
the suggested steps of Jose i made a csw getRecords request with my new own
output schema. This worked fine so far. Thanks for the help, Jose.

But now I'm a bit confused what i have to do next. my new output schemas,
which i want to implement in geonetwork don't have the same schema structure
as iso19139. where do i have to define this new schema. Is it right in
"geonetwork_branch_2_6_x\web\src\main\webapp\xml\schemas"? the next question
is, where do i have to define the mappings? i think, i have to define a xslt
to do a mapping to my new output schema. In
"geonetwork_branch_2_6_x\web\src\main\webapp\xsl" there are quite a large
list of xsl's. Is this the right location?

I know, that are many questions. I hope, someone could help me regarding
this problems. Thanks in advance.

regards

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/CSW-Request-getRecords-define-own-outputSchema-tp5015911p5016867.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.

The following url may help you understand the schema structure and related
files.

http://geonetwork-opensource.org/manuals/trunk/developer/schemaPlugins/index.html
<http://geonetwork-opensource.org/manuals/trunk/developer/schemaPlugins/index.html&gt;

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/CSW-Request-getRecords-define-own-outputSchema-tp5015911p5016918.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.