Norwegian metadata API

The Norwegian metdata API - GeonorgeAPI - has been developed as an easy to use metadata access API. It provides access to metadata and underlying data and web services and acts as a supplement to the Norwegian CSW service.

GeonorgeAPI is a C# class library built on top of Arkitektum.GIS.Lib.MetadataCSW. This API allows you to avoid serialisation back and forth between objects and XMI. All handling of HTTP-traffic is packed into the API. The API includes the following functionality:

 

  • Plain text search (Fritekstsøk) 
  • Search organisation name (Søk med organisasjonsnavn)
  • Search with filters (Søk med filter)
  • Get record with UUID (Hent record med uuid)
  • Metadata Insert
  • Metadata Update
  • Metadata Delete

 

Documentation: github: https://github.com/kartverket/GeonorgeAPI/

Metadata is stored in ISO19139 format in the Norwegian Geoportal (Geonorge). This is a large structure, and the XML standard may be challenging to use. The API has been developed in order to reduce these challenges, e.g. using abstraction class-easing manipulation.  

The abstract class is named “SimpleMetadata”. Using ordinary Property fields permits delivery of content for specific metadata fields and field updates.   

Example:

SimpleMetadata metadata = SimpleMetadata.CreateDataset(); metadata.Title = "This is my dataset!"; metadata.Abstract = "This is the abstract telling you everything you need to know about this dataset."; metadata.ContactPublisher = new SimpleContact {      Name = "John Smith",      Email = "nothing@example.com",      Organisation = "My organisation",      Role = "publisher" };

MD_Metadata_Type isoMetadata = metadata.GetMetadata();

Use and code

SimpleMetadata allows you to extract serialised objects from ISO19139 for further use. 

GeoNorge api = new GeoNorge("myusername", "mypassword"); api.MetadataUpdate(isoMetadata);

Code is available at GitHub, but also as an installable NuGet package.

PM> Install-Package GeoNorgeAPI