OGCebRIM

From Omar Wiki

Jump to: navigation, search

OGC ebRIM mapping

The OGC CSW ebRIM catalog profile specifications includes the definition of schema components for the basic extension package.

A little bit of work is required to get this into omar, but it looks good when it is done!

The steps are as follows

Profile (resources encoded within request)

omar.home\misc\samples\extDB\ogc

using xincluder (http://xincluder.sourceforge.net) to create one complete Basic-pkg.xml and copy this to the folder above

  • Used a guid generator (see genUUID ant target in omar) to generate unique ids for the rim:association elements within Basic-pkg.xml
  • Removed rim:slot from the declared rim:AdhocQuery elements.
  • Remove xml:base artifacts (XML Spy Home Edition will validate this this document if you assign the rim.xsd version 3 schema - http://www.oasis-open.org/committees/regrep/documents/3.0/schema/rim.xsd )
  • Add missing references to Basic-pkgs.xml

   <rim:ClassificationNode objectType="urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:ClassificationNode" parent="urn:x-ogc:specification:csw-ebrim:Region:002" id="urn:x-ogc:specification:csw-ebrim:Region:062" code="062">
      <rim:Name>
          <rim:LocalizedString xml:lang="en" value="South-Central Asia"/>
          <rim:LocalizedString xml:lang="fr" value="Asie central-sud"/>
      </rim:Name>
   </rim:ClassificationNode>

  • Changed the parent node for the Basic-pkg.xml elements with the following ids as illustrated

 <rim:ClassificationNode id="urn:x-ogc:specification:csw-ebrim:DIGEST-FACC:AQ"   objectType="urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:ClassificationNode" parent="urn:x-ogc:specification:csw-ebrim:DIGEST-FACC:A" code="AQ">
 <rim:ClassificationNode id="urn:x-ogc:specification:csw-ebrim:DIGEST-FACC:AP" objectType="urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:ClassificationNode" parent="urn:x-ogc:specification:csw-ebrim:DIGEST-FACC:A" code="AP">
 <rim:ClassificationNode id="urn:x-ogc:specification:csw-ebrim:DIGEST-FACC:AN" objectType="urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:ClassificationNode" parent="urn:x-ogc:specification:csw-ebrim:DIGEST-FACC:A" code="AN">

  • Change the association type for the Basic-pkg.xml elements with the following ids as illustrated

 <rim:Association sourceObject="urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:ExternalLink" associationType="urn:x-ogc:specification:csw-ebrim:AssociationType:RepositoryItemFor" targetObject="urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:ExtrinsicObject" id="urn:uuid:E03D35DE-D1A1-11DB-9644-046756D89593"/>
 <rim:Association sourceObject="urn:x-ogc:specification:csw-ebrim:ObjectType:Annotation" associationType="urn:x-ogc:specification:csw-ebrim:AssociationType:Annotates" targetObject="urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject" id="urn:uuid:D3876E0E-D1A1-11DB-843C-E06656D89593"/>

  • Performed a search and replace with objecType being replaced by objectType
  • Moved classifications outside of package declaration (to be fixed in Omar4)
  • Wrapped Basic-pkg.xml in a SubmitObjectsRequest as follows

 <?xml version="1.0" encoding="UTF-8"?>
 <SubmitObjectsRequest xmlns="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0" xmlns:lcm="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0"   xmlns:query="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0"   xmlns:rim="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0"   xmlns:rs="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0"   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"   xsi:schemaLocation="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0 http://www.oasis-open.org/committees/regrep/documents/3.0/schema/lcm.xsd">
   <rs:RequestSlotList>
     <rim:Slot name="urn:oasis:names:tc:ebxml-regrep:rim:RegistryObject:dontVersion">
       <rim:ValueList>
         <rim:Value>true</rim:Value>
       </rim:ValueList>
     </rim:Slot>
     <rim:Slot name="urn:oasis:names:tc:ebxml-regrep:rim:RegistryObject:dontVersionContent">
       <rim:ValueList>
         <rim:Value>true</rim:Value>
       </rim:ValueList>
     </rim:Slot>
    </rs:RequestSlotList>
  <rim:RegistryObjectList>

close these elements to make a valid xml file

  • Commented out adhoc queries in basic-package as these will be implemented as omar plugins.
  • Edit build-extDB and add the following ant target

 <target name="loadOGCProfile">
   <echo message="Loading OGC Profile as RegistryOperator"/>
   <soapSender req="${build.samples}/extDB/ogc/Basic-pkg.xml"/>
 </target>

  • Finally do
    • build compile (to copy Basic-pkg.xml to the build directory)
    • build loadOGCProfile
    • or if db is empty, build createMinDB, then build loadOGCProfile