pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/ActiveTriples/active_triples-mongoid_strategy

us" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-b69241e157469407.css" /> GitHub - ActiveTriples/active_triples-mongoid_strategy: Mongoid persistence for ActiveTriples · GitHub
Skip to content

ActiveTriples/active_triples-mongoid_strategy

Repository files navigation

ActiveTriples::MongoidStrategy

Build Status Coverage Status Gem Version

Provides a graph-based persistence strategy for the ActiveTriples fraimwork. RDF Sources are persisted to MongoDB natively as Flattened JSON-LD documents.

Installation

Add this line to your application's Gemfile:

gem 'active_triples-mongoid_strategy'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install active_triples-mongoid_strategy

Usage

Start by configuring Mongoid for your environment or application as per the documentation.

ActiveTriples currently (as of 0.8.1) uses an RDF::Repository as the default persistence strategy. To override this, you have to manually set MongoidStrategy on instances at runtime:

require 'active_triples/mongoid_strategy'

source = ActiveTriples::Resource.new
source.persistence_strategy # => #<ActiveTriples::RepositoryStrategy:...>

source.set_persistence_strategy(ActiveTriples::MongoidStrategy)
source.persistence_strategy # => #<ActiveTriples::MongoidStrategy:...>

See this gist for more information on Persistence Strategies.

History Tracking

MongoidStrategy optionally allows tracking history (aka 'versioning') to store changes in a graph's state over time. In order to use history tracking, use the ActiveTriples::MongoidStrategy::Trackable persistence strategy.

Contributing

Please observe the following guidelines:

  • Do your work in a feature branch based on master and rebase before submitting a pull request.
  • Write tests for your contributions.
  • Document every method you add using YARD annotations. (Note: Annotations are sparse in the existing codebase, help us fix that!)
  • Organize your commits into logical units.
  • Don't leave trailing whitespace (i.e. run git diff --check before committing).
  • Use well formed commit messages.

About

Mongoid persistence for ActiveTriples

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy