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

Resolves: https://jira.duraspace.org/browse/FCREPO-1552 #32

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -72,7 +72,7 @@ public void testNodeAdded() throws Exception {
final String eventTypes = REPOSITORY + "NODE_ADDED," + REPOSITORY + "PROPERTY_ADDED";
final String eventProps = REPOSITORY + "lastModified," + REPOSITORY + "primaryType," +
REPOSITORY + "lastModifiedBy," + REPOSITORY + "created," + REPOSITORY + "mixinTypes," +
REPOSITORY + "createdBy," + REPOSITORY + "uuid";
REPOSITORY + "createdBy";
template.sendBodyAndHeaders("", createEvent(nodeID, eventTypes, eventProps, eventID));

assertMockEndpointsSatisfied();
Expand Down Expand Up @@ -139,7 +139,7 @@ public void testFileAdded() throws Exception {
final String eventTypes = REPOSITORY + "NODE_ADDED," + REPOSITORY + "PROPERTY_ADDED";
final String eventProps = REPOSITORY + "lastModified," + REPOSITORY + "primaryType," +
REPOSITORY + "lastModifiedBy," + REPOSITORY + "created," + REPOSITORY + "mixinTypes," +
REPOSITORY + "createdBy," + REPOSITORY + "uuid" + REPOSITORY + "hasContent," +
REPOSITORY + "createdBy," + REPOSITORY + "hasContent," +
PREMIS + "hasSize," + PREMIS + "hasOriginalName," + REPOSITORY + "digest";
template.sendBodyAndHeaders("", createEvent(fileID, eventTypes, eventProps, eventID));

Expand Down
Expand Up @@ -103,8 +103,7 @@ private Map<String, Object> getEventHeaders() {
REPOSITORY + "primaryType",
REPOSITORY + "lastModifiedBy",
REPOSITORY + "created",
REPOSITORY + "mixinTypes",
REPOSITORY + "uuid"
REPOSITORY + "mixinTypes"
};

// send an audit event to an external triplestore
Expand Down
1 change: 0 additions & 1 deletion fcrepo-indexing-solr/src/test/resources/container.rdf
Expand Up @@ -9,6 +9,5 @@
<rdf:type rdf:resource="http://www.w3.org/ns/ldp#Container"/>
<rdf:type rdf:resource="http://fedora.info/definitions/v4/repository#Container"/>
<rdf:type rdf:resource="http://fedora.info/definitions/v4/repository#Resource"/>
<fedora:uuid rdf:datatype="http://www.w3.org/2001/XMLSchema#string">278bad29-b6c9-4574-a921-00d822cd65da</fedora:uuid>
</rdf:Description>
</rdf:RDF>
1 change: 0 additions & 1 deletion fcrepo-indexing-solr/src/test/resources/indexable.rdf
Expand Up @@ -12,6 +12,5 @@
<rdf:type rdf:resource="http://fedora.info/definitions/v4/repository#Resource"/>
<rdf:type rdf:resource="http://fedora.info/definitions/v4/indexing#Indexable"/>
<indexing:hasIndexingTransformation>default</indexing:hasIndexingTransformation>
<fedora:uuid rdf:datatype="http://www.w3.org/2001/XMLSchema#string">278bad29-b6c9-4574-a921-00d822cd65da</fedora:uuid>
</rdf:Description>
</rdf:RDF>
Expand Up @@ -144,6 +144,9 @@
"content_type": From the HTTP headers of incoming stream
"resourcename": From SolrCell request param resource.name
-->
<field name="created" type="text_general" indexed="true" stored="true" required="false" multiValued="false" />
<field name="has_parent" type="text_general" indexed="true" stored="true" required="false" multiValued="false" />

<field name="title" type="text_general" indexed="true" stored="true" multiValued="true"/>
<field name="uuid" type="string" indexed="true" stored="true"/>
<field name="subject" type="text_general" indexed="true" stored="true"/>
Expand All @@ -155,7 +158,7 @@
<field name="resourcename" type="text_general" indexed="true" stored="true"/>
<field name="url" type="text_general" indexed="true" stored="true"/>
<field name="content_type" type="string" indexed="true" stored="true" multiValued="true"/>
<field name="last_modified" type="date" indexed="true" stored="true"/>
<field name="last_modified" type="text_general" indexed="true" stored="true"/>
<field name="links" type="string" indexed="true" stored="true" multiValued="true"/>

<!-- Main body of document extracted by SolrCell.
Expand Down
Expand Up @@ -45,14 +45,12 @@ public class TestUtils {
public static String sparqlUpdate(final String uri) {
final String rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
final String fcrepo = "http://fedora.info/definitions/v4/repository#";
final String uuid = "278bad29-b6c9-4574-a921-00d822cd65da";

return "update=INSERT DATA { " +
"<" + uri + "> <" + rdf + "type> <http://www.w3.org/ns/ldp#RDFSource> . " +
"<" + uri + "> <" + rdf + "type> <" + fcrepo + "Resource> . " +
"<" + uri + "> <" + rdf + "type> <http://www.w3.org/ns/ldp#Container> . " +
"<" + uri + "> <" + rdf + "type> <" + fcrepo + "Container> . " +
"<" + uri + "> <" + fcrepo + "uuid> \"" + uuid + "\"^^<http://www.w3.org/2001/XMLSchema#string> . }";
"<" + uri + "> <" + rdf + "type> <" + fcrepo + "Container> . }";
}

/**
Expand Down
Expand Up @@ -2,4 +2,4 @@
<http://localhost:8080/fcrepo4/rest/foo> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://fedora.info/definitions/v4/repository#Resource> .
<http://localhost:8080/fcrepo4/rest/foo> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/ns/ldp#Container> .
<http://localhost:8080/fcrepo4/rest/foo> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://fedora.info/definitions/v4/repository#Container> .
<http://localhost:8080/fcrepo4/rest/foo> <http://fedora.info/definitions/v4/repository#uuid> "278bad29-b6c9-4574-a921-00d822cd65da"^^<http://www.w3.org/2001/XMLSchema#string> .
<http://localhost:8080/fcrepo4/rest/foo> .
Expand Up @@ -9,6 +9,5 @@
<rdf:type rdf:resource="http://www.w3.org/ns/ldp#Container"/>
<rdf:type rdf:resource="http://fedora.info/definitions/v4/repository#Container"/>
<rdf:type rdf:resource="http://fedora.info/definitions/v4/repository#Resource"/>
<fedora:uuid rdf:datatype="http://www.w3.org/2001/XMLSchema#string">278bad29-b6c9-4574-a921-00d822cd65da</fedora:uuid>
</rdf:Description>
</rdf:RDF>
Expand Up @@ -12,6 +12,5 @@
<rdf:type rdf:resource="http://fedora.info/definitions/v4/repository#Resource"/>
<rdf:type rdf:resource="http://fedora.info/definitions/v4/indexing#Indexable"/>
<indexing:hasIndexingTransformation>default</indexing:hasIndexingTransformation>
<fedora:uuid rdf:datatype="http://www.w3.org/2001/XMLSchema#string">278bad29-b6c9-4574-a921-00d822cd65da</fedora:uuid>
</rdf:Description>
</rdf:RDF>