Skip to content

arcticlcc/metadata-catalog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Metadata Catalog

The Metadata Catalog provides access to project and product(dataset) metadata. While the metadata may be presented to the user in multple formats, the catalog utilizes the mdJSON format as a datastore. mdJSON records are parsed to provide information about projects and products. HTML and XML metadata may be produced from the mdJSON using the ADIwg mdTranslator. The mdTools application provides an interface for exploring mdJSON and related tools.

Installation

Requirements

  • PHP >=5.5.9
    • Composer
    • SQLite3 (for default config)
  • PostgreSQL >=9.4
  • Webserver (for production)

Installing

The following steps assume you have PostgreSQL 9.4+ installed, and a database and user account created for use with the catalog. See the PostgreSQL download page for installation info.

The Ubuntu community wiki has info on creating databases and users. If you're on Windows try the Bitnami WAPP Stack for an all-in-one install. There's also one for Linux.

From the command line:

  1. Clone the repo git clone https://github.com/arcticlcc/metadata-catalog.git
  2. cd metadata-catalog
  3. Install Composer, if needed. You can install in the project root, or in a location on your path (i.e. $HOME/bin)
  4. Run composer install or composer.phar install
  5. Edit the following files in the config directory:
  6. Create the schema in your database: bin/console doctrine:schema:create
  7. Type bin/console assetic:dump to build the development environment
  8. Type composer run and point your browser to http://localhost:8888
  9. You should have an empty catalog!
  10. Import some sample data: bin/console metadata:import:dbal

API

The Catalog application is backed by a simple RESTful API. The API interface is described below using the following notation:

  • ... : the web root for the catalog
  • {required} : a required string
  • [optional] : an optional string
  • option1 | option2 : pipe(|) separated list of valid values

GET

.../

Returns the homepage(HTML-only)


.../{entity}[.{format}]

Returns an array of entities in the desired format

  • entity = [project | product]
  • format = [json]

.../{entity}/[view]

Returns the entity homepage displaying a list of entities

  • entity = [project | product]
  • Note: a request to .../{entity}/ will redirect to .../{entity}/view

.../{entity}/{uuid}[.{format}]

Returns a single entity corresponding to the supplied uuid, in the desired format

  • entity = [project | product]
  • uuid = a valid UUID
  • format = [json | xml | html]

.../{entity}/{uuid}/[view]

Returns a web page for a single entity

  • entity = [project | product]
  • uuid = a valid UUID
  • Note: a request to .../{entity}/{uuid}/ will redirect to .../{entity}/{uuid}/view

.../{entity1}/{id}/{entity2}[.{format}][?short=true]

Returns an array of related entities in the desired format

  • entity1 = [project | product]
  • id = a valid UUID for entity1
  • entity2 = [project | product]
  • format = [json]
  • short = boolean [false | true]: if true, will return an array of citations for entity2

.../{uuid}[.{format}]

Returns a single entity corresponding to the supplied uuid, in the desired format

  • uuid = a valid UUID
  • format = [json | xml | html]

.../{uuid}/[view]

Returns the entity homepage corresponding to the supplied uuid

  • uuid = a valid UUID

POST

.../sync/[type]

Triggers a sync event.

About

Catalog for project and product metadata built on the Silex PHP micro-framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published