Code Monkey home page Code Monkey logo

rdf-vocab's Introduction

rdf-vocab

Common OWL/RDFS Vocabularies for use with Ruby RDF.rb

Gem Version Build Status

Extensions

This gem extends RDF::Vocabulary with #to_ttl, #to_jsonld, and #to_html methods to create special-purpose vocabulary serializations. The HTML version is templated using a Haml template to allow output to be customized.

Also extends RDF::Vocabulary::Format with the gen-vocab command extension to the rdf executable.

Vocabularies

Installation

Add to your Gemfile

gem "rdf-vocab"

then

bundle install

Usage

require "rdf/vocab"

This will load all the vocabulary classes in the library.

Also adds the gen-vocab command to the rdf command-line executable to generate specifically generated output in Turtle, JSON-LD, and HTML+RDFa for either built-in or arbitrary vocabularies.

Adding new vocabularies

  • First, add an entry to lib/rdf/vocab.rb, the key names contained within for guidance. For more information, see the documentation on RDF::Vocabulary.
  • Next, create an empty file in lib/rdf/vocab based on the key name for your vocabulary. For example, if you've added the vocabulary :foo, create a new empty file at lib/rdf/vocab/foo.rb.
  • Run rake gen_vocabs.

Authors

Contributing

This repository uses Git Flow to mange development and release activity. All submissions must be on a feature branch based on the develop branch to ease staging and integration.

  • Do your best to adhere to the existing coding conventions and idioms.
  • Don't use hard tabs, and don't leave trailing whitespace on any line. Before committing, run git diff --check to make sure of this.
  • Do document every method you add using YARD annotations. Read the tutorial or just look at the existing code for examples.
  • Don't touch the .gemspec or VERSION files. If you need to change them, do so on your private branch only.
  • Do note that in order for us to merge any non-trivial changes (as a rule of thumb, additions larger than about 15 lines of code), we need an explicit public domain dedication on record from you.

License

This is free and unencumbered public domain software. For more information, see http://unlicense.org/ or the accompanying {file:LICENSE} file.

rdf-vocab's People

Contributors

acoburn avatar anarchivist avatar cdchapman avatar dazza-codes avatar dchandekstark avatar dunn avatar gkellogg avatar jcoyne avatar mjgiarlo avatar ndushay avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.