Skip to content
Permalink
Browse files

Renaming types to match new functions

  • Loading branch information...
ajs6f committed Apr 2, 2014
1 parent 7f7a3f5 commit 6ea0d00f1a1da482a3a154ef3101661ed149ebcf
Showing with 244 additions and 243 deletions.
  1. +3 −3 fcrepo-auth-roles-common/src/main/java/org/fcrepo/auth/roles/common/AccessRolesResources.java
  2. +2 −2 fcrepo-auth-roles-common/src/test/java/org/fcrepo/auth/roles/common/AccessRolesResourcesTest.java
  3. +3 −3 ...nnector-file/src/test/java/org/fcrepo/integration/connector/file/FedoraFileSystemConnectorIT.java
  4. +2 −2 fcrepo-http-api/src/main/java/org/fcrepo/http/api/FedoraIdentifiers.java
  5. +3 −3 fcrepo-http-api/src/main/java/org/fcrepo/http/api/FedoraNodes.java
  6. +3 −3 fcrepo-http-api/src/main/java/org/fcrepo/http/api/repository/FedoraRepositoryWorkspaces.java
  7. +2 −2 fcrepo-http-api/src/main/java/org/fcrepo/http/api/url/HttpApiResources.java
  8. +3 −3 fcrepo-http-api/src/test/java/org/fcrepo/http/api/FedoraBatchTest.java
  9. +3 −3 fcrepo-http-api/src/test/java/org/fcrepo/http/api/FedoraFieldSearchTest.java
  10. +3 −3 fcrepo-http-api/src/test/java/org/fcrepo/http/api/FedoraFixityTest.java
  11. +9 −9 fcrepo-http-api/src/test/java/org/fcrepo/http/api/FedoraNodesTest.java
  12. +3 −3 fcrepo-http-api/src/test/java/org/fcrepo/http/api/repository/FedoraRepositoriesPropertiesTest.java
  13. +2 −2 fcrepo-http-api/src/test/java/org/fcrepo/http/api/url/HttpApiResourcesTest.java
  14. +2 −2 fcrepo-http-commons/src/main/java/org/fcrepo/http/commons/AbstractResource.java
  15. +2 −2 fcrepo-http-commons/src/main/java/org/fcrepo/http/commons/api/rdf/HttpGraphSubjects.java
  16. +3 −3 fcrepo-http-commons/src/main/java/org/fcrepo/http/commons/api/rdf/HttpTripleUtil.java
  17. +2 −2 fcrepo-http-commons/src/main/java/org/fcrepo/http/commons/api/rdf/UriAwareResourceModelFactory.java
  18. +4 −4 fcrepo-http-commons/src/test/java/org/fcrepo/http/commons/api/rdf/GraphSubjectsTest.java
  19. +2 −2 fcrepo-http-commons/src/test/java/org/fcrepo/http/commons/api/rdf/HttpGraphSubjectsTest.java
  20. +2 −2 fcrepo-http-commons/src/test/java/org/fcrepo/http/commons/api/rdf/HttpTripleUtilTest.java
  21. +8 −8 fcrepo-kernel-api/src/main/java/org/fcrepo/kernel/FedoraResource.java
  22. +5 −5 .../fcrepo/kernel/identifiers/{ExternalIdentifierTranslator.java → ExternalIdentifierConverter.java}
  23. +2 −2 ...rc/main/java/org/fcrepo/kernel/identifiers/{IdentifierTranslator.java → IdentifierConverter.java}
  24. +3 −3 .../fcrepo/kernel/identifiers/{InternalIdentifierTranslator.java → InternalIdentifierConverter.java}
  25. +2 −2 fcrepo-kernel-api/src/main/java/org/fcrepo/kernel/rdf/GraphProperties.java
  26. +1 −1 ...o-kernel-api/src/main/java/org/fcrepo/kernel/rdf/{GraphSubjects.java → IdentifierTranslator.java}
  27. +2 −2 fcrepo-kernel-api/src/main/java/org/fcrepo/kernel/services/DatastreamService.java
  28. +2 −2 fcrepo-kernel-api/src/main/java/org/fcrepo/kernel/services/RepositoryService.java
  29. +5 −5 fcrepo-kernel-api/src/main/java/org/fcrepo/kernel/utils/NodePropertiesTools.java
  30. +3 −3 fcrepo-kernel-api/src/test/java/org/fcrepo/kernel/identifiers/ExternalIdentifierTranslatorTest.java
  31. +15 −15 fcrepo-kernel/src/main/java/org/fcrepo/kernel/FedoraResourceImpl.java
  32. +1 −1 .../src/main/java/org/fcrepo/kernel/identifiers/{HierarchyTranslator.java → HierarchyConverter.java}
  33. +5 −5 .../src/main/java/org/fcrepo/kernel/identifiers/{NamespaceTranslator.java → NamespaceConverter.java}
  34. +4 −4 .../src/main/java/org/fcrepo/kernel/identifiers/{PrefixingTranslator.java → PrefixingConverter.java}
  35. +8 −8 fcrepo-kernel/src/main/java/org/fcrepo/kernel/rdf/JcrRdfTools.java
  36. +2 −2 fcrepo-kernel/src/main/java/org/fcrepo/kernel/rdf/impl/DefaultGraphSubjects.java
  37. +2 −2 fcrepo-kernel/src/main/java/org/fcrepo/kernel/rdf/impl/FixityRdfContext.java
  38. +2 −2 fcrepo-kernel/src/main/java/org/fcrepo/kernel/rdf/impl/HierarchyRdfContext.java
  39. +3 −3 fcrepo-kernel/src/main/java/org/fcrepo/kernel/rdf/impl/JcrGraphProperties.java
  40. +5 −5 fcrepo-kernel/src/main/java/org/fcrepo/kernel/rdf/impl/NodeRdfContext.java
  41. +2 −2 fcrepo-kernel/src/main/java/org/fcrepo/kernel/rdf/impl/PropertiesRdfContext.java
  42. +2 −2 fcrepo-kernel/src/main/java/org/fcrepo/kernel/rdf/impl/RootRdfContext.java
  43. +3 −3 fcrepo-kernel/src/main/java/org/fcrepo/kernel/rdf/impl/VersionsRdfContext.java
  44. +2 −2 fcrepo-kernel/src/main/java/org/fcrepo/kernel/rdf/impl/WorkspaceRdfContext.java
  45. +4 −4 fcrepo-kernel/src/main/java/org/fcrepo/kernel/rdf/impl/mappings/PropertyToTriple.java
  46. +2 −2 fcrepo-kernel/src/main/java/org/fcrepo/kernel/services/DatastreamServiceImpl.java
  47. +2 −2 fcrepo-kernel/src/main/java/org/fcrepo/kernel/services/RepositoryServiceImpl.java
  48. +4 −4 fcrepo-kernel/src/main/java/org/fcrepo/kernel/utils/JcrPropertyStatementListener.java
  49. +4 −4 fcrepo-kernel/src/main/java/org/fcrepo/kernel/utils/iterators/PersistingRdfStreamConsumer.java
  50. +2 −2 fcrepo-kernel/src/main/java/org/fcrepo/kernel/utils/iterators/RdfAdder.java
  51. +2 −2 fcrepo-kernel/src/main/java/org/fcrepo/kernel/utils/iterators/RdfRemover.java
  52. +3 −3 fcrepo-kernel/src/test/java/org/fcrepo/integration/kernel/FedoraObjectIT.java
  53. +4 −4 fcrepo-kernel/src/test/java/org/fcrepo/kernel/FedoraResourceImplTest.java
  54. +4 −4 ...t/java/org/fcrepo/kernel/identifiers/{HierarchyTranslatorTest.java → HierarchyConverterTest.java}
  55. +4 −4 ...t/java/org/fcrepo/kernel/identifiers/{NamespaceTranslatorTest.java → NamespaceConverterTest.java}
  56. +2 −2 ...t/java/org/fcrepo/kernel/identifiers/{PrefixingTranslatorTest.java → PrefixingConverterTest.java}
  57. +2 −2 fcrepo-kernel/src/test/java/org/fcrepo/kernel/rdf/impl/HierarchyRdfContextTest.java
  58. +2 −2 fcrepo-kernel/src/test/java/org/fcrepo/kernel/rdf/impl/JcrGraphPropertiesTest.java
  59. +2 −2 fcrepo-kernel/src/test/java/org/fcrepo/kernel/rdf/impl/NodeRdfContextTest.java
  60. +2 −2 fcrepo-kernel/src/test/java/org/fcrepo/kernel/rdf/impl/PropertiesRdfContextTest.java
  61. +2 −2 fcrepo-kernel/src/test/java/org/fcrepo/kernel/rdf/impl/WorkspaceRdfContextTest.java
  62. +2 −2 fcrepo-kernel/src/test/java/org/fcrepo/kernel/rdf/impl/mappings/PropertyToTripleTest.java
  63. +2 −2 fcrepo-kernel/src/test/java/org/fcrepo/kernel/services/DatastreamServiceTest.java
  64. +2 −2 fcrepo-kernel/src/test/java/org/fcrepo/kernel/services/RepositoryServiceTest.java
  65. +2 −2 fcrepo-kernel/src/test/java/org/fcrepo/kernel/utils/JcrPropertyStatementListenerTest.java
  66. +3 −3 fcrepo-kernel/src/test/java/org/fcrepo/kernel/utils/JcrRdfToolsTest.java
  67. +2 −2 fcrepo-kernel/src/test/java/org/fcrepo/kernel/utils/NodePropertiesToolsTest.java
  68. +2 −2 fcrepo-kernel/src/test/java/org/fcrepo/kernel/utils/iterators/PersistingRdfStreamConsumerTest.java
  69. +2 −2 fcrepo-kernel/src/test/java/org/fcrepo/kernel/utils/iterators/RdfAdderTest.java
  70. +2 −2 fcrepo-kernel/src/test/java/org/fcrepo/kernel/utils/iterators/RdfRemoverTest.java
  71. +2 −2 fcrepo-rss/src/main/java/org/fcrepo/syndication/RssResources.java
  72. +2 −2 fcrepo-rss/src/test/java/org/fcrepo/syndication/RssResourcesTest.java
  73. +2 −2 fcrepo-transform/src/main/java/org/fcrepo/transform/http/FedoraSparql.java
  74. +2 −2 fcrepo-transform/src/main/java/org/fcrepo/transform/http/TransformResources.java
  75. +5 −4 fcrepo-transform/src/main/java/org/fcrepo/transform/sparql/JQLConverter.java
  76. +6 −6 fcrepo-transform/src/main/java/org/fcrepo/transform/sparql/JQLResultSet.java
  77. +2 −2 fcrepo-transform/src/test/java/org/fcrepo/integration/JQLConverterIT.java
  78. +2 −2 fcrepo-transform/src/test/java/org/fcrepo/transform/http/FedoraTransformTest.java
  79. +2 −2 fcrepo-transform/src/test/java/org/fcrepo/transform/http/TransformResourcesTest.java
  80. +2 −2 fcrepo-transform/src/test/java/org/fcrepo/transform/sparql/JQLResultSetTest.java
  81. +2 −2 fcrepo-webhooks/src/main/java/org/fcrepo/webhooks/WebhooksResources.java
  82. +2 −2 fcrepo-webhooks/src/test/java/org/fcrepo/webhooks/WebhooksResourcesTest.java
@@ -27,7 +27,7 @@
import org.fcrepo.jcr.FedoraJcrTypes;
import org.fcrepo.kernel.FedoraResource;
import org.fcrepo.kernel.RdfLexicon;
import org.fcrepo.kernel.rdf.GraphSubjects;
import org.fcrepo.kernel.rdf.IdentifierTranslator;
import org.springframework.stereotype.Component;

import com.hp.hpl.jena.rdf.model.Model;
@@ -46,11 +46,11 @@
* (non-Javadoc)
* @see org.fcrepo.http.commons.api.rdf.UriAwareResourceModelFactory#
* createModelForResource( org.fcrepo.kernel.FedoraResourceImpl,
* javax.ws.rs.core.UriInfo, org.fcrepo.kernel.rdf.GraphSubjects)
* javax.ws.rs.core.UriInfo, org.fcrepo.kernel.rdf.IdentifierTranslator)
*/
@Override
public Model createModelForResource(final FedoraResource resource,
final UriInfo uriInfo, final GraphSubjects graphSubjects)
final UriInfo uriInfo, final IdentifierTranslator graphSubjects)
throws RepositoryException {
final Model model = ModelFactory.createDefaultModel();
final Resource s = graphSubjects.getGraphSubject(resource.getNode().getPath());
@@ -31,7 +31,7 @@
import org.fcrepo.jcr.FedoraJcrTypes;
import org.fcrepo.kernel.FedoraResource;
import org.fcrepo.kernel.RdfLexicon;
import org.fcrepo.kernel.rdf.GraphSubjects;
import org.fcrepo.kernel.rdf.IdentifierTranslator;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Matchers;
@@ -49,7 +49,7 @@
public class AccessRolesResourcesTest {

@Mock
private GraphSubjects graphSubjects;
private IdentifierTranslator graphSubjects;

@Mock
private FedoraResource fedoraResource;
@@ -48,7 +48,7 @@

import org.fcrepo.kernel.FedoraObject;
import org.fcrepo.kernel.FedoraResource;
import org.fcrepo.kernel.rdf.GraphSubjects;
import org.fcrepo.kernel.rdf.IdentifierTranslator;
import org.fcrepo.kernel.rdf.impl.DefaultGraphSubjects;
import org.fcrepo.kernel.services.DatastreamService;
import org.fcrepo.kernel.services.NodeService;
@@ -190,7 +190,7 @@ public void testRemoveProperty() throws RepositoryException {
"'some-property-to-remove' }";

// Write the properties
final GraphSubjects graphSubjects = new DefaultGraphSubjects();
final IdentifierTranslator graphSubjects = new DefaultGraphSubjects();
object.updatePropertiesDataset(graphSubjects, sparql);

// Verify property exists
@@ -206,7 +206,7 @@ public void testRemoveProperty() throws RepositoryException {
"}";

// Remove the properties
final GraphSubjects graphSubjectsRemove = new DefaultGraphSubjects();
final IdentifierTranslator graphSubjectsRemove = new DefaultGraphSubjects();
object.updatePropertiesDataset(graphSubjectsRemove, sparqlRemove);

// Persist the object (although the propery will be removed from memory without this.)
@@ -52,7 +52,7 @@
import org.fcrepo.http.commons.AbstractResource;
import org.fcrepo.http.commons.api.rdf.HttpGraphSubjects;
import org.fcrepo.http.commons.session.InjectedSession;
import org.fcrepo.kernel.rdf.GraphSubjects;
import org.fcrepo.kernel.rdf.IdentifierTranslator;
import org.fcrepo.kernel.utils.iterators.RdfStream;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
@@ -128,7 +128,7 @@ public String apply(final String identifier) {
}

private static Function<String, Triple> identifier2triple(
final GraphSubjects subjects, final Node pidsResult) {
final IdentifierTranslator subjects, final Node pidsResult) {
return new Function<String, Triple>() {

@Override
@@ -103,7 +103,7 @@
import org.fcrepo.kernel.Datastream;
import org.fcrepo.kernel.FedoraResource;
import org.fcrepo.kernel.exception.InvalidChecksumException;
import org.fcrepo.kernel.rdf.GraphSubjects;
import org.fcrepo.kernel.rdf.IdentifierTranslator;
import org.fcrepo.kernel.utils.iterators.RdfStream;
import org.slf4j.Logger;
import org.springframework.context.annotation.Scope;
@@ -612,7 +612,7 @@ public Response copyObject(@PathParam("path") final List<PathSegment> path,

try {

final GraphSubjects subjects =
final IdentifierTranslator subjects =
new HttpGraphSubjects(session, FedoraNodes.class, uriInfo);

if (!nodeService.exists(session, toPath(path))) {
@@ -681,7 +681,7 @@ public Response moveObject(@PathParam("path") final List<PathSegment> pathList,
throw new WebApplicationException(builder.build());
}

final GraphSubjects subjects =
final IdentifierTranslator subjects =
new HttpGraphSubjects(session, FedoraNodes.class, uriInfo);

final String destination =
@@ -53,7 +53,7 @@
import org.fcrepo.http.commons.api.rdf.HttpGraphSubjects;
import org.fcrepo.http.commons.responses.HtmlTemplate;
import org.fcrepo.http.commons.session.InjectedSession;
import org.fcrepo.kernel.rdf.GraphSubjects;
import org.fcrepo.kernel.rdf.IdentifierTranslator;
import org.fcrepo.kernel.rdf.JcrRdfTools;
import org.fcrepo.kernel.utils.iterators.RdfStream;
import org.springframework.context.annotation.Scope;
@@ -84,7 +84,7 @@
public RdfStream getWorkspaces()
throws RepositoryException {

final GraphSubjects subjects =
final IdentifierTranslator subjects =
new HttpGraphSubjects(session, FedoraNodes.class, uriInfo);

return JcrRdfTools.withContext(null, session).getWorkspaceTriples(subjects).session(session);
@@ -116,7 +116,7 @@ public Response createWorkspace(@PathParam("path") final String path,

workspace.createWorkspace(path);

final GraphSubjects subjects =
final IdentifierTranslator subjects =
new HttpGraphSubjects(session.getRepository().login(path), FedoraNodes.class, uriInfo);


@@ -43,7 +43,7 @@
import org.fcrepo.http.api.repository.FedoraRepositoryWorkspaces;
import org.fcrepo.http.commons.api.rdf.UriAwareResourceModelFactory;
import org.fcrepo.kernel.FedoraResource;
import org.fcrepo.kernel.rdf.GraphSubjects;
import org.fcrepo.kernel.rdf.IdentifierTranslator;
import org.fcrepo.serialization.SerializerUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@@ -64,7 +64,7 @@

@Override
public Model createModelForResource(final FedoraResource resource,
final UriInfo uriInfo, final GraphSubjects graphSubjects)
final UriInfo uriInfo, final IdentifierTranslator graphSubjects)
throws RepositoryException {

final Model model = createDefaultModel();
@@ -64,7 +64,7 @@
import org.apache.commons.io.IOUtils;
import org.fcrepo.kernel.Datastream;
import org.fcrepo.kernel.FedoraResourceImpl;
import org.fcrepo.kernel.rdf.GraphSubjects;
import org.fcrepo.kernel.rdf.IdentifierTranslator;
import org.fcrepo.kernel.services.DatastreamService;
import org.fcrepo.kernel.services.NodeService;
import org.fcrepo.kernel.services.VersionService;
@@ -156,7 +156,7 @@ public void testBatchSparqlUpdate() throws Exception {
multipart.bodyPart(part);

testObj.batchModify(createPathList(pid), multipart);
verify(mockObject).updatePropertiesDataset(any(GraphSubjects.class), eq("xyz"));
verify(mockObject).updatePropertiesDataset(any(IdentifierTranslator.class), eq("xyz"));
verify(mockSession).save();
}

@@ -187,7 +187,7 @@ public void testBatchRdfPost() throws Exception {

testObj.batchModify(createPathList(pid), multipart);
final ArgumentCaptor<Model> captor = ArgumentCaptor.forClass(Model.class);
verify(mockObject).replaceProperties(any(GraphSubjects.class), captor.capture());
verify(mockObject).replaceProperties(any(IdentifierTranslator.class), captor.capture());
final Model capturedModel = captor.getValue();
assertTrue(capturedModel.contains(capturedModel.createResource("http://localhost/fcrepo/" + pid),
capturedModel.createProperty("info:a"),
@@ -37,7 +37,7 @@
import javax.ws.rs.core.UriInfo;
import javax.ws.rs.core.Variant;

import org.fcrepo.kernel.rdf.GraphSubjects;
import org.fcrepo.kernel.rdf.IdentifierTranslator;
import org.fcrepo.kernel.services.RepositoryService;
import org.junit.Before;
import org.junit.Ignore;
@@ -84,7 +84,7 @@ public void testFieldSearch() throws RepositoryException {
when(
mockService
.searchRepository(
any(GraphSubjects.class),
any(IdentifierTranslator.class),
eq(createResource("http://localhost/fcrepo/fcr:search?q=ZZZ")),
eq(mockSession), eq("ZZZ"), eq(0), eq(0L)))
.thenReturn(createMem());
@@ -94,7 +94,7 @@ public void testFieldSearch() throws RepositoryException {

verify(mockService)
.searchRepository(
any(GraphSubjects.class),
any(IdentifierTranslator.class),
eq(createResource("http://localhost/fcrepo/fcr:search?q=ZZZ")),
eq(mockSession), eq("ZZZ"), eq(0), eq(0L));
}
@@ -34,7 +34,7 @@
import javax.ws.rs.core.UriInfo;

import org.fcrepo.kernel.Datastream;
import org.fcrepo.kernel.rdf.GraphSubjects;
import org.fcrepo.kernel.rdf.IdentifierTranslator;
import org.fcrepo.kernel.services.DatastreamService;
import org.fcrepo.kernel.utils.iterators.RdfStream;
import org.junit.Before;
@@ -79,11 +79,11 @@ public void testGetDatastreamFixity() throws RepositoryException {
when(mockDs.getNode()).thenReturn(mockNode);
when(mockDatastreams.getDatastream(mockSession, path)).thenReturn(
mockDs);
when(mockDatastreams.getFixityResultsModel(any(GraphSubjects.class),
when(mockDatastreams.getFixityResultsModel(any(IdentifierTranslator.class),
eq(mockDs))).thenReturn(new RdfStream());
testObj.getDatastreamFixity(createPathList("objects", pid, "testDS"),
mockRequest, uriInfo);
verify(mockDatastreams).getFixityResultsModel(any(GraphSubjects.class),
verify(mockDatastreams).getFixityResultsModel(any(IdentifierTranslator.class),
eq(mockDs));
}
}
@@ -72,7 +72,7 @@
import org.fcrepo.kernel.FedoraObject;
import org.fcrepo.kernel.FedoraResourceImpl;
import org.fcrepo.kernel.identifiers.PidMinter;
import org.fcrepo.kernel.rdf.GraphSubjects;
import org.fcrepo.kernel.rdf.IdentifierTranslator;
import org.fcrepo.kernel.services.DatastreamService;
import org.fcrepo.kernel.services.NodeService;
import org.fcrepo.kernel.services.ObjectService;
@@ -322,9 +322,9 @@ public void testDescribeObject() throws RepositoryException {
when(mockDataset.getContext()).thenReturn(mockContext);
when(mockObject.getLastModifiedDate()).thenReturn(mockDate);
when(mockObject.getEtagValue()).thenReturn("");
when(mockObject.getTriples(any(GraphSubjects.class))).thenReturn(
when(mockObject.getTriples(any(IdentifierTranslator.class))).thenReturn(
mockRdfStream);
when(mockObject.getHierarchyTriples(any(GraphSubjects.class))).thenReturn(
when(mockObject.getHierarchyTriples(any(IdentifierTranslator.class))).thenReturn(
mockRdfStream2);
when(mockNodes.getObject(isA(Session.class), isA(String.class)))
.thenReturn(mockObject);
@@ -349,9 +349,9 @@ public void testDescribeObjectNoInlining() throws RepositoryException {

when(mockObject.getEtagValue()).thenReturn("");
when(mockObject.getLastModifiedDate()).thenReturn(mockDate);
when(mockObject.getTriples(any(GraphSubjects.class))).thenReturn(
when(mockObject.getTriples(any(IdentifierTranslator.class))).thenReturn(
mockRdfStream);
when(mockObject.getHierarchyTriples(any(GraphSubjects.class))).thenReturn(
when(mockObject.getHierarchyTriples(any(IdentifierTranslator.class))).thenReturn(
mockRdfStream2);
when(mockNodes.getObject(isA(Session.class), isA(String.class)))
.thenReturn(mockObject);
@@ -371,7 +371,7 @@ public void testSparqlUpdate() throws RepositoryException, IOException {
final InputStream mockStream =
new ByteArrayInputStream("my-sparql-statement".getBytes());
when(mockNodes.getObject(mockSession, path)).thenReturn(mockObject);
when(mockObject.updatePropertiesDataset(any(GraphSubjects.class), any(String.class)))
when(mockObject.updatePropertiesDataset(any(IdentifierTranslator.class), any(String.class)))
.thenReturn(mockDataset);
when(mockObject.getEtagValue()).thenReturn("");

@@ -381,7 +381,7 @@ public void testSparqlUpdate() throws RepositoryException, IOException {
when(mockModel.isEmpty()).thenReturn(true);
testObj.updateSparql(createPathList(pid), getUriInfoImpl(), mockStream, mockRequest);

verify(mockObject).updatePropertiesDataset(any(GraphSubjects.class),
verify(mockObject).updatePropertiesDataset(any(IdentifierTranslator.class),
eq("my-sparql-statement"));
verify(mockSession).save();
verify(mockSession).logout();
@@ -402,7 +402,7 @@ public void testReplaceRdf() throws IllegalArgumentException, Exception {
when(mockNodes.getObject(mockSession, path)).thenReturn(mockObject);

testObj.createOrReplaceObjectRdf(createPathList(pid), getUriInfoImpl(), MediaType.valueOf("application/n3"), mockStream, mockRequest);
verify(mockObject).replaceProperties(any(GraphSubjects.class), any(Model.class));
verify(mockObject).replaceProperties(any(IdentifierTranslator.class), any(Model.class));
}

@Test
@@ -427,7 +427,7 @@ public void testCreateRdf() throws Exception {
assertNotNull(actual);
assertEquals(CREATED.getStatusCode(), actual.getStatus());
assertTrue(actual.getEntity().toString().endsWith(pid));
verify(mockObject).replaceProperties(any(GraphSubjects.class),
verify(mockObject).replaceProperties(any(IdentifierTranslator.class),
any(Model.class));
verify(mockObjects).createObject(mockSession, path);
verify(mockSession).save();
@@ -32,7 +32,7 @@
import javax.jcr.Session;

import org.fcrepo.kernel.FedoraObject;
import org.fcrepo.kernel.rdf.GraphSubjects;
import org.fcrepo.kernel.rdf.IdentifierTranslator;
import org.fcrepo.kernel.services.NodeService;
import org.junit.Before;
import org.junit.Test;
@@ -71,11 +71,11 @@ public void testSparqlUpdate() throws RepositoryException, IOException {
new ByteArrayInputStream("my-sparql-statement".getBytes());
when(mockNodes.getObject(mockSession, "/")).thenReturn(mockObject);
when(
mockObject.updatePropertiesDataset(any(GraphSubjects.class),
mockObject.updatePropertiesDataset(any(IdentifierTranslator.class),
any(String.class))).thenReturn(mockDataset);
testObj.updateSparql(mockStream);

verify(mockObject).updatePropertiesDataset(any(GraphSubjects.class),
verify(mockObject).updatePropertiesDataset(any(IdentifierTranslator.class),
eq("my-sparql-statement"));
verify(mockSession).save();
verify(mockSession).logout();
@@ -41,7 +41,7 @@
import org.fcrepo.http.api.FedoraNodes;
import org.fcrepo.http.commons.api.rdf.HttpGraphSubjects;
import org.fcrepo.kernel.FedoraResourceImpl;
import org.fcrepo.kernel.rdf.GraphSubjects;
import org.fcrepo.kernel.rdf.IdentifierTranslator;
import org.fcrepo.serialization.SerializerUtil;
import org.junit.Before;
import org.junit.Test;
@@ -70,7 +70,7 @@
@Mock
private NodeType mockNodeType;

private GraphSubjects mockSubjects;
private IdentifierTranslator mockSubjects;

@Mock
private SerializerUtil mockSerializers;
@@ -29,7 +29,7 @@
import org.fcrepo.http.commons.session.SessionFactory;
import org.fcrepo.kernel.FedoraResource;
import org.fcrepo.kernel.identifiers.PidMinter;
import org.fcrepo.kernel.rdf.GraphSubjects;
import org.fcrepo.kernel.rdf.IdentifierTranslator;
import org.fcrepo.kernel.services.DatastreamService;
import org.fcrepo.kernel.services.NodeService;
import org.fcrepo.kernel.services.ObjectService;
@@ -152,7 +152,7 @@ public static final String toPath(final List<PathSegment> paths) {

protected void addResponseInformationToStream(
final FedoraResource resource, final RdfStream dataset,
final UriInfo uriInfo, final GraphSubjects subjects)
final UriInfo uriInfo, final IdentifierTranslator subjects)
throws RepositoryException {
if (httpTripleUtil != null) {
httpTripleUtil.addHttpComponentModelsForResourceToStream(dataset, resource,
@@ -20,7 +20,7 @@
import com.hp.hpl.jena.rdf.model.Resource;

import org.fcrepo.kernel.exception.RepositoryRuntimeException;
import org.fcrepo.kernel.rdf.GraphSubjects;
import org.fcrepo.kernel.rdf.IdentifierTranslator;
import org.fcrepo.kernel.services.functions.GetDefaultWorkspace;
import org.slf4j.Logger;

@@ -56,7 +56,7 @@
* </ul>
*
*/
public class HttpGraphSubjects implements GraphSubjects {
public class HttpGraphSubjects implements IdentifierTranslator {

private static final Logger LOGGER = getLogger(HttpGraphSubjects.class);
public static final String WORKSPACE_PREFIX = "workspace:";
Oops, something went wrong.

0 comments on commit 6ea0d00

Please sign in to comment.
You can’t perform that action at this time.