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

Fcrepo indexing #39

Merged
merged 11 commits into from
May 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Sep 05 14:52:42 EDT 2016
#Wed Mar 01 15:49:11 AST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.0-all.zip
38 changes: 38 additions & 0 deletions islandora-indexing-fcrepo/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
apply plugin: 'osgi'

description = 'Islandora CLAW Fcrepo Indexer'

dependencies {
compile group: 'org.apache.camel', name: 'camel-core', version: camelVersion
compile group: 'org.apache.camel', name: 'camel-blueprint', version: camelVersion
compile group: 'org.apache.camel', name: 'camel-http4', version: camelVersion
compile group: 'org.apache.camel', name: 'camel-jackson', version: camelVersion
compile group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
compile group: 'commons-io', name: 'commons-io', version: commonsIoVersion
testCompile group: 'org.apache.camel', name: 'camel-test-blueprint', version: camelVersion
testCompile group: 'org.apache.activemq', name: 'activemq-camel', version: activemqVersion
testCompile group: 'org.apache.servicemix.bundles', name: 'org.apache.servicemix.bundles.xerces', version: '2.11.0_1'
testCompile group: 'org.ow2.asm', name: 'asm-commons', version: '5.0.3'
}

jar {
manifest {
description project.description
docURL project.docURL
vendor project.vendor
license project.license

instruction 'Import-Package', 'org.apache.camel.component.http4,' +
"org.apache.camel;version=\"${camelVersionRange}\"," +
"org.apache.activemq.camel.component;version=\"${activemqVersion}\"," +
defaultOsgiImports
instruction 'Export-Package', 'ca.islandora.indexing.fcrepo'
}
}

artifacts {
archives (file('build/cfg/main/ca.islandora.alpaca.indexing.fcrepo.cfg')) {
classifier 'configuration'
type 'cfg'
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Number of times to attempt retries before sending to dead letter queue
error.maxRedeliveries=5

# Queues for creating a new Fedora resource
create.input.stream=activemq:queue:islandora-indexing-fcrepo-create
create.dead.stream=activemq:queue:islandora-indexing-fcrepo-create-dead
create.output.stream=mock:result

# Queues for updating an existing Fedora resource
update.input.stream=activemq:queue:islandora-indexing-fcrepo-update
update.dead.stream=activemq:queue:islandora-indexing-fcrepo-update-dead
update.output.stream=mock:result

# Queues for deleting a Fedora resource
delete.input.stream=activemq:queue:islandora-indexing-fcrepo-delete
delete.dead.stream=activemq:queue:islandora-indexing-fcrepo-delete-dead
delete.output.stream=mock:result

# Queues to map paths using Gemini
map.input.stream=activemq:queue:islandora-indexing-fcrepo-map
map.dead.stream=activemq:queue:islandora-indexing-fcrepo-map-dead

# Queues to unmap paths using Gemini
unmap.input.stream=activemq:queue:islandora-indexing-fcrepo-unmap
unmap.dead.stream=activemq:queue:islandora-indexing-fcrepo-unmap-dead

# Urls for all the various services
milliner.baseUrl=http://localhost:8000/milliner/metadata
gemini.baseUrl=http://localhost:8000/gemini
drupal.baseUrl=http://localhost:8000
fcrepo.baseUrl=http://localhost:8080/fcrepo/rest
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*
* Licensed to Islandora Foundation under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* The Islandora Foundation licenses this file to you under the MIT License.
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package ca.islandora.alpaca.indexing.fcrepo;

/**
* POJO for a user performing an action. Part of an AS2Event.
*
* @author Danny Lamb
*/
public class AS2Actor {

/**
* @return Type of user
*/
public String getType() {
return type;
}

/**
* @param type Type of user
*/
public void setType(final String type) {
this.type = type;
}

/**
* @return URI of user
*/
public String getId() {
return id;
}

/**
* @param id URI of user
*/
public void setId(final String id) {
this.id = id;
}

private String type;
private String id;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
/*
* Licensed to Islandora Foundation under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* The Islandora Foundation licenses this file to you under the MIT License.
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package ca.islandora.alpaca.indexing.fcrepo;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* POJO for events emitted by Islandora.
*
* @author Danny Lamb
*/
public class AS2Event {

/**
* @return Event type (Create, Update, Delete, etc...)
*/
public String getType() {
return type;
}

/**
* @param type Event type (Create, Update, Delete, etc...)
*/
public void setType(final String type) {
this.type = type;
}

/**
* @return URI of the resource acted upon
*/
public String getObject() {
return object;
}

/**
* @param object URI of the resource acted upon
*/
public void setObject(final String object) {
this.object = object;
}

/**
* @return User performing the action
*/
public AS2Actor getActor() {
return actor;
}

/**
* @param actor User performing the action
*/
public void setActor(final AS2Actor actor) {
this.actor = actor;
}

/**
* @return JSON-LD Context
*/
@JsonProperty(value = "@context")
public String getContext() {
return context;
}

/**
* @param context JSON-LD Context
*/
public void setContext(final String context) {
this.context = context;
}

private String context;
private String type;
private String object;
private AS2Actor actor;

}
Loading