Skip to content

Commit

Permalink
Merge pull request #41 from acoburn/fcrepo-2009
Browse files Browse the repository at this point in the history
Follow-on to cleanup of RdfLexicon
  • Loading branch information
escowles committed Oct 28, 2016
2 parents 4b9acf8 + 802c147 commit fe77da1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
5 changes: 2 additions & 3 deletions src/main/java/org/fcrepo/audit/AuditProperties.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,13 @@
*/
package org.fcrepo.audit;

import static org.apache.jena.vocabulary.RDF.type;
import static org.fcrepo.audit.AuditNamespaces.REPOSITORY;
import static org.fcrepo.audit.AuditNamespaces.AUDIT;
import static org.fcrepo.audit.AuditNamespaces.PREMIS;
import static org.fcrepo.audit.AuditNamespaces.PROV;
import static org.fcrepo.audit.AuditNamespaces.EVENT_TYPE;
import static org.fcrepo.kernel.api.RdfLexicon.EVENT_NAMESPACE;
import static org.fcrepo.kernel.api.RdfLexicon.RDF_NAMESPACE;


/**
* @author acoburn
Expand All @@ -48,7 +47,7 @@ public final class AuditProperties {
public static final String PREMIS_AGENT = PREMIS + "hasEventRelatedAgent";
public static final String PREMIS_TYPE = PREMIS + "hasEventType";

public static final String RDF_TYPE = RDF_NAMESPACE + "type";
public static final String RDF_TYPE = type.getURI();

public static final String BINARY_TYPE = REPOSITORY + "Binary";
public static final String RESOURCE_CREATION = EVENT_NAMESPACE + "ResourceCreation";
Expand Down
8 changes: 4 additions & 4 deletions src/test/java/org/fcrepo/audit/InternalAuditorTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import static org.fcrepo.audit.AuditNamespaces.PREMIS;
import static org.fcrepo.audit.AuditNamespaces.PROV;
import static org.fcrepo.audit.AuditNamespaces.REPOSITORY;
import static org.fcrepo.kernel.api.RdfLexicon.RDF_NAMESPACE;
import static org.fcrepo.audit.AuditProperties.RDF_TYPE;
import static org.fcrepo.kernel.api.observer.EventType.RESOURCE_CREATION;
import static org.fcrepo.kernel.api.observer.EventType.RESOURCE_DELETION;
import static org.fcrepo.kernel.api.observer.EventType.RESOURCE_MODIFICATION;
Expand Down Expand Up @@ -173,11 +173,11 @@ public void testNodeAddedWithProperties() throws Exception {
when(mockContainerService.findOrCreate(any(FedoraSession.class), anyString())).thenReturn(mockContainer);
when(mockContainer.getNode()).thenReturn(mockNode);
testTnternalAuditor.recordEvent(mockFedoraEvent);
verify(testTnternalAuditor).createStatement(any(Resource.class), eq(RDF_NAMESPACE + "type"),
verify(testTnternalAuditor).createStatement(any(Resource.class), eq(RDF_TYPE),
eq(createResource(AUDIT + "InternalEvent")));
verify(testTnternalAuditor).createStatement(any(Resource.class), eq(RDF_NAMESPACE + "type"),
verify(testTnternalAuditor).createStatement(any(Resource.class), eq(RDF_TYPE),
eq(createResource(PREMIS + "Event")));
verify(testTnternalAuditor).createStatement(any(Resource.class), eq(RDF_NAMESPACE + "type"),
verify(testTnternalAuditor).createStatement(any(Resource.class), eq(RDF_TYPE),
eq(createResource(PROV + "InstantaneousEvent")));
verify(testTnternalAuditor).createStatement(any(Resource.class), eq(PREMIS + "hasEventDateTime"),
eq(createTypedLiteral("2015-04-10T14:30:36Z", XSDdateTime)));
Expand Down

0 comments on commit fe77da1

Please sign in to comment.