-
Notifications
You must be signed in to change notification settings - Fork 20
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
Triplestsore indexer #28
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If bumping activeMQ version here to 5.14.1 claw vagrant needs to be bumped here also
https://github.com/Islandora-CLAW/claw_vagrant/blob/8eb5513a561d444463fd36eddb4f7b9ae0d320e8/configs/karaf/fcrepo_camel_toolbox.script#L2 ?
@DiegoPino I have updated the install scripts to rely on the features.xml provided by Alpaca. We no longer have to add the feature repos for camel and activemq by hand. islandora-deprecated/claw_vagrant#8 |
@Islandora-CLAW/committers @Natkeeran This is ready for review, with install instructions. These changes cover three PRs, so if something's not clear and you're having problems with installing it, tag me. |
I'm doing it the hard way, I'm building Alpaca inside and replacing the islandora-indexer-triplestore feature. We'll see if I can do it without getting lost. |
Ok that didn't do anything, I'll try by the instructions here. |
For the record, you'd have to
Basically, you're resetting karaf, getting rid of any old config, and then re-installing the recompiled Alpaca. Afterwards, you gotta re-touch up the config. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
property placeholders in blueprint should load their values from the provided islandora.alpaca.indexing.triplestore.cfg
file. Does not seem to be a good idea to have settings/URL hardcoded in blueprint properties if we are already providing a .cfg file for this.
@@ -8,18 +8,23 @@ | |||
http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd"> | |||
|
|||
<!-- OSGI blueprint property placeholder --> | |||
<cm:property-placeholder id="properties" persistent-id="ca.islandora.indexing.triplestore" update-strategy="reload" /> | |||
<cm:property-placeholder id="properties" persistent-id="ca.islandora.alpaca.indexing.triplestore" update-strategy="reload" > |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we have already an islandora.alpaca.indexing.triplestore.cfg
file that defines these properties' values, we should load them from here instead of hardcoding. See http://camel.apache.org/properties.html#Properties-Usinga.cfgor.propertiesFileForBlueprintPropertyPlaceholders
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DiegoPino The properties placeholder element in blueprint.xml
is what loads the config file, and the 'hardcoded' values you're referring to are the defaults in case someone modifies a config file and removes an entry. It also is what bridges the gap and allows me to refer to values from config within routes, and not just in the blueprint file.
http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd"> | ||
|
||
<!-- OSGI blueprint property placeholder --> | ||
<cm:property-placeholder id="properties" persistent-id="ca.islandora.indexing.triplestore" update-strategy="reload" > |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above: tests settings should be loaded from .cfg file. See http://camel.apache.org/properties.html#Properties-Usinga.cfgor.propertiesFileForBlueprintPropertyPlaceholders
@dannylamb Trying a vagrant up with alpaca.sh checking out your branch threw an error.
|
@whikloj ok, looks like that config file needs a |
@dannylamb ok, I got the same issue as @whikloj . Naming for |
@whikloj @DiegoPino My last test properly deployed the config file, and this PR addresses that here. Is your Alpaca on your vagrant box cloned from my branch and repo?
|
@dannylamb yeah, that is the correct file: <configfile finalname="/etc/ca.islandora.alpaca.indexing.triplestore.cfg">mvn:ca.islandora.alpaca/islandora-indexing-triplestore/${project.version}/cfg/configuration</configfile> But the tests are referencing at <cm:property-placeholder id="properties" persistent-id="ca.islandora.indexing.triplestore" update-strategy="reload" > I can be getting this all wrong of course so please excuse me if so. |
Yeah I also see the correct file path in the karaf features.xml. |
vagrant up |
Still doesn't work, removed and tried reloading inside vagrant. Still didn't work. |
@whikloj I haven't pushed the changes up yet. Give me a minute. |
I'm doing another fresh vagrant up on my end to verify before setting folks loose on this again. |
And another one. |
@dannylamb build came up clean for me now. I'll proceed with testing further. |
@dannylamb I'll give it a try as well. Followed the steps. It does not index it for me! I cannot see any triples related to the resource that was created. |
All test procedures work for me. I'm comfortable merging. |
I see objects created, I see JSON-LD REST responses, but nothing in the triplestore. Karaf says
Do I need to make REST requests available to all users? |
Oh wait the configuration changes did not take effect. I might have this. |
Ok using the instructions this PR, islandora-deprecated/claw_vagrant#8 and Islandora/documentation#34 all work. I'm merging all 3. 👍 |
Islandora/documentation#394
This adds a small camel connector to index RDF from CLAW into a triplestore.
To Test
Assuming you're starting from scratch here (it's easier than getting lost in Karaf)
$ cd /path/to/claw_vagrant
$ git pull https://github.com/dannylamb/claw_vagrant triplestore-indexer
alpaca.sh
to saygit clone -b triplestsore-indexer https://github.com/dannylamb/Alpaca.git
instead of cloning from origin/master. Be mindful of the spelling on that branch name. I derped pushing it up to Githubvagrant up
islandora
module (you will have to disableislandora_collection
too)vagrant ssh
$ cd /var/www/html/drupal/web/modules/contrib/islandora
$ git pull https://github.com/dannylamb/islandora.git triplestore-indexer
islandora
andislandora_collection
modules.Once installed:
http://localhost:8000/admin/content/fedora_resource
and create a new Fedora resourcehttp://localhost:8080/bigdata/#query
and issue aselect ?s ?p ?o where { ?s ?p ?o }
query to get all triples. You should see the triples from the rdf mapping for the bundle you created.