Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meta-Issue: FITS Derivatives #934

Open
dannylamb opened this issue Sep 20, 2018 · 14 comments
Open

Meta-Issue: FITS Derivatives #934

dannylamb opened this issue Sep 20, 2018 · 14 comments
Labels
Repository:Alpaca Issues pertaining to the repository: https://github.com/Islandora/Alpaca Subject: Ansible Playbook Related to the maintenance and upkeep associated with an Ansible Playbook for Islandora. Always also Subject: Drupal related specifically to Drupal, usually pointing somewhere on drupal.org Type: documentation provides documentation or asks for documentation. Type: enhancement Identifies work on an enhancement to the Islandora codebase Type: Meta-issue Identifies multiple related tickets for ease

Comments

@dannylamb
Copy link
Contributor

dannylamb commented Sep 20, 2018

This is a meta-issue to track the development of FITS derivative generation functionality. Please refer to this issue in any subsequent issue in order to link them.

Currently, we have removed code from claw-playbook to install a FITS server, mostly because of time out issues when we weren't even prepared to use it yet. Now that we're ready to use it, we need to

  • Add the FITS web service back into claw-playbook
  • Emit derivative events from Drupal to a queue
  • Read from the queue using camel, issue a request to the FITS microservice, and store the results in the repository
@Natkeeran
Copy link
Contributor

@dannylamb

Need some clarification. "store the results in the repository". Does this mean storing it in Drupal as a media or file?

@dannylamb
Copy link
Contributor Author

@Natkeeran Ideally we'd have a way to extract bits from the FITS XML on the way in and apply that to the original Media as fields. But i'm not sure what the best approach would be on that. My intention in the issue description was just to create a file, create a media for it, and associate that with the node. That's at least comparable to 7.x until we figure out a way to generically handle all the fields and format specific metadata FITS can churn out.

@ajs6f
Copy link

ajs6f commented Oct 4, 2018

@dannylamb A "cheap and cheerful" way might be to use an XSLT transform to go from FITS XML to RDF/XML (I know, I hate it too) and thence to properties. I'd be happy to write that XSLT to order if it turns out to be useful.

@Natkeeran
Copy link
Contributor

Natkeeran commented Oct 4, 2018

@dannylamb

Where should we handle the logic to issue the request and storing the results should be handled.

The FITS webservice itself is out of the box service. Seems like we may need a micro service. Or, we can possibly handle the logic in Alpaca.

@dannylamb
Copy link
Contributor Author

@Natkeeran It's a judgement call. You can make another microservice to do the logic in PHP, or you can deal with it in Java/Camel. Making a request to the FITS service and poking Drupal with the results is easy/stable with Java and Camel. That's how I'd approach this to start. If it starts getting into lots of dirty array processing / string manipulation, etc... then I'd start considering PHP.

@dannylamb
Copy link
Contributor Author

@ajs6f I shudder at the thought of xslts in the stack. Let's hope it doesn't come to that, but if it does, I'll hunt you down to make good on that promise 👿

@ajs6f
Copy link

ajs6f commented Oct 5, 2018

@dannylamb Fair enough, I hear you. 😁 There are plenty of other good ways to do it. It might be better to turn the task around-- i.e. to figure out what the extraction is abstractly (which properties), then decide on what would be a good way to impl that. I guess that (which properties to extract) is a conversation that should involve lots of good advice from the metadata squad.

@jonathangreen
Copy link
Contributor

Maybe we could contribute back to the FITS tool a JSON output? Not sure how open they would be to something like that.

@ajs6f
Copy link

ajs6f commented Oct 5, 2018

+1 to @jonathangreen . That's the strongest solution and it should be tried first. (Even better, a JSON-LD output!)

@dannylamb
Copy link
Contributor Author

Maybe we could run http://camel.apache.org/xmljson.html on some FITS xml and see what pops out.

@DiegoPino
Copy link
Contributor

DiegoPino commented Oct 5, 2018

In PHP its 2 lines. Includes the xml properties, nothing lost.

https://gist.github.com/DiegoPino/4bb61af523bc9639698938f1e69112b3

(if you remove the XML itself and the final Prints()) its two lines of course

Feel free to run directly to test the output.

adding a @context is just a matter of flattening, collecting the keys.. adding the URLs (well, that means a new ontology ..), array combine = JSON-ld and compact. done.

@ajs6f
Copy link

ajs6f commented Oct 5, 2018

Going to JSON and thence to JSON-LD sounds great. I don't think the selection of JSON-LD context is entirely trivial, but that could be a different ticket.

@dannylamb
Copy link
Contributor Author

In PHP its 2 lines.

^^ or that

@rosiel
Copy link
Member

rosiel commented May 1, 2019

In reference to Danny's comment of

@Natkeeran Ideally we'd have a way to extract bits from the FITS XML on the way in and apply that to the original Media as fields. But i'm not sure what the best approach would be on that. My intention in the issue description was just to create a file, create a media for it, and associate that with the node. That's at least comparable to 7.x until we figure out a way to generically handle all the fields and format specific metadata FITS can churn out.

Right now we're leaning to the route of save the XML as a Media attached to the node. This is because we don't know ahead of time what "fields" FITS will output, and each would have to be installed in Drupal ahead of time, and configured to display, etc. But since nobody except :nerds: like to read XML, we're considering using the same XSLT that turned it into field:value pairs for display in an HTML table that was in use in 7.

@kstapelfeldt kstapelfeldt added Repository:Alpaca Issues pertaining to the repository: https://github.com/Islandora/Alpaca Subject: Ansible Playbook Related to the maintenance and upkeep associated with an Ansible Playbook for Islandora. Always also Type: documentation provides documentation or asks for documentation. Subject: Drupal related specifically to Drupal, usually pointing somewhere on drupal.org Type: enhancement Identifies work on an enhancement to the Islandora codebase and removed Alpaca labels Sep 25, 2021
@kstapelfeldt kstapelfeldt added Type: Meta-issue Identifies multiple related tickets for ease and removed enhancement labels Sep 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Repository:Alpaca Issues pertaining to the repository: https://github.com/Islandora/Alpaca Subject: Ansible Playbook Related to the maintenance and upkeep associated with an Ansible Playbook for Islandora. Always also Subject: Drupal related specifically to Drupal, usually pointing somewhere on drupal.org Type: documentation provides documentation or asks for documentation. Type: enhancement Identifies work on an enhancement to the Islandora codebase Type: Meta-issue Identifies multiple related tickets for ease
Projects
Development

No branches or pull requests

7 participants