[GeoNetwork-users] MEF2 not importing into GN2.10.1?

I have created what I believed was a MEF 2 package (contents zipped). GN complains that there is no metadata, and will not load the package. I have tried the package with and without metadata.iso19139.xml.

If I move the metadata record outside of the metadata folder (metadata folder deleted), then it does load. This package would then be in the MEF 1.0 format.

What am I not understanding, please?

Directory: F:\metadataData\mefVersion2\oceans\metadata
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 2013-08-18 4:35 PM 34115 metadata.iso19139.xml
-a--- 2013-08-18 4:35 PM 34115 metadata.xml

Directory: F:\metadataData\mefVersion1\oceans\private
Mode LastWriteTime Length Name
---- ------------- ------ ----
----- 2009-12-04 1:59 PM 576 physical_seamounts.shp

Directory: F:\metadataData\mefVersion1\oceans\public
Mode LastWriteTime Length Name
---- ------------- ------ ----
----- 2013-07-31 7:21 AM 633682 large_thumbnail.png
----- 2013-08-09 6:39 PM 67441 thumbnail.png

Directory: F:\metadataData\mefVersion1\oceans
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 2013-08-18 5:14 PM 1182 info.xml

=======
Contents of info.xml:
<info version="2.0">
     <general>
<uuid>025E382B-80E2-4D66-8101-0F44F90EF324</uuid>
         <createDate>2010-08-31</createDate>
         <changeDate>2013-08-18T16:45:25</changeDate>
<siteId>4a8e5b33-051d-443f-90f6-5f171f4ac80e</siteId>
         <siteName>Data Centre - Development</siteName>
         <schema>iso19139</schema>
         <format>full</format>
         <isTemplate>false</isTemplate>
         <rating>0</rating>
         <popularity>0</popularity>
     </general>
     <categories>
         <category name="datasets" />
     </categories>
     <privileges>
         <group name="all">
             <operation name="view" />
             <operation name="download"/>
             <operation name="dynamic"/>
             <operation name="featured"/>
         </group>
     </privileges>
     <public>
         <file name="thumbnail.png" changeDate="2013-08-09T18:39:37" />
         <file name="large_thumbnail.png" changeDate="2013-07-31T07:21:25" />
     </public>
     <private>
         <file name="physical_seamounts.shp" changeDate="2009-12-04T14:59:06" />
     </private>
</info>

I suggest that you do an export as zip. In this case the ZIP file is
basically the MEF2 format. You can mimic this file/folder layout in your
testing and it should work.

http://geonetwork-opensource.org/manuals/2.10.0/eng/users/managing_metadata/export/index.html

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/MEF2-not-importing-into-GN2-10-1-tp5073056p5073122.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

Thanks Ian.

I exported the Eurasia example that was included in the GN distribution
package, and that I had previously loaded. It did export as MEF2.

I then deleted the Eurasia example from the GN repository, and then tried to
import it from the zip file. GN responded: "Metadata is not valid.
BadFormatEx : Missing metadata file : metadata.xml "

as it does for my metadata.

I can easily work around the problem by using MEF1.1 format, but there may
be an import issue, unless I am still missing something.

-- terry

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/MEF2-not-importing-into-GN2-10-1-tp5073056p5073225.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

Terry,

I'm assuming that you mean that you replaced the metadata.xml with your
metadata. MEF2 requires the file to be called metadata.xml.
Also, you will need to modify the folder name and info.xml to match the file
identifier for the new metadata.xml.

You can post the sample that you are trying to upload and I can take a look
at it.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/MEF2-not-importing-into-GN2-10-1-tp5073056p5073400.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

Hi Ian,

I rechecked what I did, and it was actually the Africa example that I
exported. I don't think that matters.

I simply exported the Africa package as a zip, as you suggested. It was in
MEF2 format. I then deleted the Africa metadata record in GN. Without
changing anything, I then tried to import the zip file back into GN. That
is, nothing supplied by me. I received the message about missing
metadata.xml.

I then moved the metadata.xml file outside of the metadata folder, deleted
the metadata folder, and rezipped the package. It loaded fine.
Essentially, this is a MEF 1.1 package.

So, I am not having much success importing *any* MEF2 package. I am pretty
certain I am doing something systematically wrong, but I cannot determine
what that is.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/MEF2-not-importing-into-GN2-10-1-tp5073056p5073458.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

Terry,

I just tried the same test and it worked fine for me running 2.10.1 on
Ubuntu.

Can you paste the logs related to the error.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/MEF2-not-importing-into-GN2-10-1-tp5073056p5073550.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

Hi Ian,

I exported the Africa example as a zip, and it exported in MEF2 format. I
then tried importing it again, and it did - surprising me. So then I tried
importing my package as a MEF2, and it failed as before, looking for
"metadata".

Here is the log. I placed some comments in the log after I imported the
Africa example, and after I tried to import my package. geonetwork.log
<http://osgeo-org.1560.x6.nabble.com/file/n5073623/geonetwork.log&gt;

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/MEF2-not-importing-into-GN2-10-1-tp5073056p5073623.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

Terry,

Looks to me like the MEF2 file format is not in the proper format. That may
explains why you were able to upload the content that was exported but not
upload your version. It may also be an issue with the info.xml file.

You may have to edit the log4j.cfg and set it to debug mode so that you can
see more specific logging (i.e. log4j.logger.geonetwork.mef = DEBUG - and
restart geonetwork server).

Good luck.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/MEF2-not-importing-into-GN2-10-1-tp5073056p5073635.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

Ian - thanks for solving my problem offline.

It took me a while to understand how you solved it, despite your
explanation. To bring this to a close for the community, I had three
problems:
First I was not understanding the MEF2 format. I was zipping the
metadata-public-private folders plus the info.xml. I needed to zip the
container for them instead.
Second, I did not have any images, so initially I did not include the
'public' folder in the info.xml file - I needed to do so. Also, I needed to
include the empty 'public' folder.
Third, I thought the URL linkage to my data file in the metadata record
would be added by GN. It can be, but only after a manual editing process
that detects and corrects this. I needed to change my xslt to include the
exact path to the data that GN was expecting.

Ian - you're brilliant!

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/MEF2-not-importing-into-GN2-10-1-tp5073056p5073692.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.