Skip to content

gina-alaska/ruby-csw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RCSW

A ruby library client for the OGC Catalogue Service. Specifically developed to consume records presented by the ESRI Geoportal CSW feed.

Developed by GINA for use in by the North Slope Science Initiative's Catalog and the EPSCoR-ACE Southcentral Testcase Catalog.

Installation

Add this line to your application's Gemfile:

gem 'rcsw'

And then execute:

$ bundle

Or install it yourself as:

$ gem install rcsw

Usage

Connect to a CSW endpoint

    require 'rcsw'
    client = RCSW::Client::Base.new('http://seakgis03.alaska.edu/geoportal/csw')

Get Capabilities

    client.capabilities.each |capability|
      puts capability
    end

Get Records

    client.records.each do |record|
      puts "#{record.title} - #{record.subject}"
    end 

Get Records by ID

  identifiers = client.records.collect{|r| r.identifier}

  single_record = client.record(identifiers.first).first
  multiple_records = client.record(identifiers.join(","))

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

About

Ruby CSW Reader libraries and client

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages