Skip to content

Commit

Permalink
MAJOR: initial commit of the NIWA-GeoCatalog supporting SilverStripe …
Browse files Browse the repository at this point in the history
…3.1.
  • Loading branch information
Rainer Spittel committed Dec 18, 2013
0 parents commit b678450
Show file tree
Hide file tree
Showing 99 changed files with 13,168 additions and 0 deletions.
20 changes: 20 additions & 0 deletions _config.php
@@ -0,0 +1,20 @@
<?php

/*
Requires XSLT-Processor, i.e.
>> sudo apt-get install php5-xsl
*/

// Change this field to anything except 'setup' do set the configuration fields
// to read-only.
CataloguePage::set_site_status('setup');

Director::addRules(100, array(
'admin/metadata' => "MetadataAdmin",
));


// Add model admin for the metadata entries.
CMSMenu::add_menu_item("metadata", 'Metadata', 'admin/metadata', "MetadataAdmin" );
30 changes: 30 additions & 0 deletions _config/config.yml
@@ -0,0 +1,30 @@
---
Name: geonetconfig
---
Catalogue:
'metadata_standard': 'iso'

'search_form': 'CatalogueSearchForm'

standard_definitions:
iso:
'name': 'ISO19139'
'request': 'cswGetRecordsSummaryISO_xml'
'response': '../geocatalog/xslt/ISO19139/iso19139_to_silverstripe.xsl'
'full_response': '../geocatalog/xslt/ISO19139/iso19139full_to_silverstripe.xsl'

anzlic:
'name': 'ANZLIC Metadata Profile'
'request': 'cswGetRecordsSummaryISO_xml'
'response': '../geocatalog/xslt/ISO19139/iso19139_to_silverstripe.xsl'

dublin:
'name': 'Dublin Core'
'request': 'cswGetRecordsSummaryDC_xml'
'response': '../geocatalog/xslt/DublicCore/dubliccore_to_silverstripe.xsl'

mcp:
'name': 'Australian Marine Community Profile MCP'
'request': 'cswGetRecordsSummaryISO_xml'
'response': 'ParseXML2MCPSummary'
'full_response': 'ParseXML2MCP'
Binary file added code/.DS_Store
Binary file not shown.
70 changes: 70 additions & 0 deletions code/BrowsePage.php
@@ -0,0 +1,70 @@
<?php
/**
* This file defines the implementation of the Browse - Page type.
*
* @author Rainer Spittel (rainer at silverstripe dot com)
* @package geocatalog
*/

/**
* BrowsePage implements the page type to browse GeoNetwork records.
*
* This page type is used to browse GeoNetwork data and visualise the results.
*/
class BrowsePage extends CataloguePage {

/**
* Overwrites {@link SiteTree::getCMSFields}.
*
* Appends a GeoNetwork JavaScript validator the the CMS backend.
*
* @return FieldSet
*/
function getCMSFields() {
Requirements::javascript('geocatalog/javascript/GeonetworkUrlValidator.js');

$fields = parent::getCMSFields();
return $fields;
}
}

class Browser_QueryClass extends Catalogue_QueryClass {

public function validate() {
}
}

/**
* Controller Class for BrowsePage
*
* Page controller class for Browse-Page {@link BrowsePage}. The controller
* class handles the requests and delegates the requests to the page instance
* as well as to the available GeoNetwork node.
*/
class BrowsePage_Controller extends CataloguePage_Controller {

protected function getQueryClass($params) {
return new Browser_QueryClass($params);
}

/**
* Validate HTTP-Request parameter.
*
* BrowsePage customise the search capabilities and allows the 'empty' search.
*
* @param array $params http-request parameter
*/
protected function validateRequest($params) {
}

/**
* Action: index
*
* Browse Page perform a empty search to populate the all results on the
* Browse Page.
*/
public function index($data) {
$html= $this->dogetrecords($data);
return $html;
}
}

0 comments on commit b678450

Please sign in to comment.