Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MAJOR: initial commit of the NIWA-GeoCatalog supporting SilverStripe …
…3.1.
- Loading branch information
Rainer Spittel
committed
Dec 18, 2013
0 parents
commit b678450
Showing
99 changed files
with
13,168 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
} |
Oops, something went wrong.