{"id":19341857,"url":"https://github.com/samvera/hydra-works","last_synced_at":"2025-05-07T20:31:00.143Z","repository":{"id":21552324,"uuid":"24871990","full_name":"samvera/hydra-works","owner":"samvera","description":"A ruby gem implementation of the PCDM Works domain model based on the Samvera software stack","archived":false,"fork":false,"pushed_at":"2024-02-14T21:19:40.000Z","size":1642,"stargazers_count":24,"open_issues_count":26,"forks_count":14,"subscribers_count":62,"default_branch":"main","last_synced_at":"2024-04-26T14:21:55.000Z","etag":null,"topics":["core-components","pcdm","ruby","samvera-community"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samvera.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2014-10-07T01:09:07.000Z","updated_at":"2022-11-18T22:06:37.000Z","dependencies_parsed_at":"2024-02-14T22:39:17.129Z","dependency_job_id":null,"html_url":"https://github.com/samvera/hydra-works","commit_stats":{"total_commits":280,"total_committers":40,"mean_commits":7.0,"dds":0.85,"last_synced_commit":"c9b9dd0cf11de671920ba0a7161db68ccf9b7f6d"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samvera%2Fhydra-works","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samvera%2Fhydra-works/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samvera%2Fhydra-works/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samvera%2Fhydra-works/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samvera","download_url":"https://codeload.github.com/samvera/hydra-works/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225046685,"owners_count":17412499,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["core-components","pcdm","ruby","samvera-community"],"created_at":"2024-11-10T03:32:47.831Z","updated_at":"2024-11-17T23:04:53.522Z","avatar_url":"https://github.com/samvera.png","language":"Ruby","readme":"# Hydra::Works\n\nCode:\n[![Gem Version](https://badge.fury.io/rb/hydra-works.png)](http://badge.fury.io/rb/hydra-works)\n[![Build Status](https://circleci.com/gh/samvera/hydra-works.svg?style=svg)](https://circleci.com/gh/samvera/hydra-works)\n[![Coverage Status](https://coveralls.io/repos/samvera/hydra-works/badge.svg?branch=main)](https://coveralls.io/r/samvera/hydra-works?branch=main)\n[![Code Climate](https://codeclimate.com/github/samvera/hydra-works/badges/gpa.svg)](https://codeclimate.com/github/samvera/hydra-works)\n\nDocs:\n[![Contribution Guidelines](http://img.shields.io/badge/CONTRIBUTING-Guidelines-blue.svg)](./CONTRIBUTING.md)\n[![Apache 2.0 License](http://img.shields.io/badge/APACHE2-license-blue.svg)](./LICENSE)\n[![API Docs](http://img.shields.io/badge/API-docs-blue.svg)](http://rubydoc.info/gems/hydra-works)\n\nCommunity Support: [![Samvera Community Slack](https://img.shields.io/badge/samvera-slack-blueviolet)](http://slack.samvera.org/)\n\n# What is hydra-works?\nThe Hydra::Works gem implements the [PCDM](https://github.com/duraspace/pcdm/wiki) [Works](https://github.com/duraspace/pcdm/blob/main/pcdm-ext/works.rdf) data model using ActiveFedora-based models. In addition to the models, Hydra::Works includes associated behaviors around the broad concept of describable \"works\" or intellectual entities, the need for which was expressed by a variety of [Samvera community use cases](https://github.com/samvera/hydra-works/tree/main/use-cases).\n\n## Product Owner \u0026 Maintenance\n\n`hydra-works` was a Core Component of the Samvera Community. Given a decline in available labor required for maintenance, this project no longer has a dedicated Product Owner. The documentation for what this means can be found [here](http://samvera.github.io/core_components.html#requirements-for-a-core-component).\n\n### Product Owner\n\n**Vacant**\n\n_Until a Product Owner has been identified, we ask that you please direct all requests for support, bug reports, and general questions to the [`#dev` Channel on the Samvera Slack](https://samvera.slack.com/app_redirect?channel=dev)._\n\n# Help\n\nThe Samvera community is here to help. Please see our [support guide](./SUPPORT.md).\n\n# Getting Started\nThe PCDM Works domain model includes the following high-level entities:\n\n * **Collection**: a *pcdm:Collection* that indirectly contains zero or more **Works** and zero or more **Collection**s\n * **Work**: a *pcdm:Object* that holds zero or more **FileSets** and zero or more **Works**\n * **FileSet**: a *pcdm:Object* that groups one or more related *pcdm:Files*, such as an original file (e.g., PDF document), its derivatives (e.g., a thumbnail), and extracted full-text\n\nView [a diagram of the Hydra::Works domain model](https://docs.google.com/drawings/d/1if47TYgEhqDLPh3D0026B_cBLa0BEAOpWPs8AqoQMZE/edit).\n\nBehaviors included in the model include:\n\n * Characterization of original files within FileSets\n * Generation of derivatives from original files\n * Virus checking of original files\n * Full-text extraction from original files\n\n## Dependencies\n\nCheck out the [Hydra::Derivatives README](https://github.com/samvera/hydra-derivatives#dependencies) for dependencies.\n\n## Additional dependencies required for specs\n\n#### ClamAV\n* Mac installation\n  ```\n  $ brew install clamav\n  $ cp /usr/local/etc/clamav/freshclam.conf.sample /usr/local/etc/clamav/freshclam.conf\n  $ freshclam\n  ```\n\n## Installation\n\nAdd these lines to your application's Gemfile:\n\n    gem 'hydra-works', '~\u003e 0.15'\n\nAnd then execute:\n\n    $ bundle install\n\nOr install it yourself:\n\n    $ gem install hydra-works\n\n## Usage\n\nUsage involves extending the behavior provided by this gem. In your application, you can create Hydra::Works-based models like so:\n\n```ruby\nclass Collection \u003c ActiveFedora::Base\n  include Hydra::Works::CollectionBehavior\nend\n\nclass Book \u003c ActiveFedora::Base\n  include Hydra::Works::WorkBehavior\nend\n\nclass Page \u003c ActiveFedora::Base\n  include Hydra::Works::FileSetBehavior\nend\n\ncollection = Collection.create\nbook = Book.create\npage = Page.create\n\ncollection.members \u003c\u003c book\ncollection.save\n\nbook.members \u003c\u003c page\nbook.save\n\nfile = page.files.build\nfile.content = \"The quick brown fox jumped over the lazy dog.\"\npage.save\n```\n\n## Virus Detection\n\nTo turn on virus detection, install [ClamAV](https://www.clamav.net/documents/installing-clamav) on your system and add the `clamby` gem to your Gemfile\n\n```ruby\ngem 'clamby'\n```\n\nThen include the `VirusCheck` module in your `FileSet` class:\n\n```ruby\nclass Page \u003c ActiveFedora::Base\n  include Hydra::Works::FileSetBehavior\n  include Hydra::Works::VirusCheck\nend\n```\n\n## Access controls\n\nWe are using [Web ACL](http://www.w3.org/wiki/WebAccessControl) as implemented by [hydra-access-controls](https://github.com/samvera/hydra-head/tree/main/hydra-access-controls).\n\n## How to contribute\n\nIf you'd like to contribute to this effort, please check out the [contributing guidelines](CONTRIBUTING.md)\n\n## Development\n\n### Testing with the continuous integration server\n\nYou can test Hydra::Works using the same process as our continuous\nintegration server. To do that, run the default rake task which will download Solr and Fedora, start them,\nand run the tests for you.\n\n```bash\nrake\n```\n\n### Testing manually\n\nIf you want to run the tests manually, first run solr and FCRepo. To start solr:\n\n```bash\nsolr_wrapper -v -d solr/config/ -n hydra-test -p 8985\n```\n\nTo start FCRepo, open another shell and run:\n\n```bash\nfcrepo_wrapper -v -p 8986 --no-jms\n```\nNote you won't find these ports mentioned in this codebase, as testing behavior is inherited from ActiveFedora.\n\nNow you’re ready to run the tests. In the directory where hydra-works\nis installed, run:\n\n```bash\nrake works:spec\n```\n\n# Acknowledgments\n\nThis software has been developed by and is brought to you by the Samvera community.  Learn more at the\n[Samvera website](http://samvera.org/).\n\n![Samvera Logo](https://wiki.duraspace.org/download/thumbnails/87459292/samvera-fall-font2-200w.png?version=1\u0026modificationDate=1498550535816\u0026api=v2)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamvera%2Fhydra-works","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamvera%2Fhydra-works","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamvera%2Fhydra-works/lists"}