Skip to content
Permalink
Browse files

Further renaming

  • Loading branch information...
ajs6f committed Apr 2, 2014
1 parent 6ea0d00 commit ab1c49b661634330cb2427b2421f45546547386d
Showing with 147 additions and 147 deletions.
  1. +1 −1 fcrepo-auth-roles-common/src/main/java/org/fcrepo/auth/roles/common/AccessRolesResources.java
  2. +1 −1 fcrepo-auth-roles-common/src/test/java/org/fcrepo/auth/roles/common/AccessRolesResourcesTest.java
  3. +1 −1 fcrepo-http-api/src/main/java/org/fcrepo/http/api/ContentExposingResource.java
  4. +2 −2 fcrepo-http-api/src/main/java/org/fcrepo/http/api/FedoraBatch.java
  5. +2 −2 fcrepo-http-api/src/main/java/org/fcrepo/http/api/FedoraContent.java
  6. +1 −1 fcrepo-http-api/src/main/java/org/fcrepo/http/api/FedoraIdentifiers.java
  7. +1 −1 fcrepo-http-api/src/main/java/org/fcrepo/http/api/FedoraImport.java
  8. +7 −7 fcrepo-http-api/src/main/java/org/fcrepo/http/api/FedoraNodes.java
  9. +2 −2 fcrepo-http-api/src/main/java/org/fcrepo/http/api/FedoraVersions.java
  10. +1 −1 fcrepo-http-api/src/main/java/org/fcrepo/http/api/repository/FedoraRepositoryWorkspaces.java
  11. +1 −1 fcrepo-http-api/src/main/java/org/fcrepo/http/api/url/HttpApiResources.java
  12. +2 −2 fcrepo-http-api/src/main/java/org/fcrepo/http/api/versioning/VersionAwareHttpGraphSubjects.java
  13. +5 −5 fcrepo-http-api/src/test/java/org/fcrepo/http/api/url/HttpApiResourcesTest.java
  14. +6 −6 fcrepo-http-api/src/test/java/org/fcrepo/http/api/versioning/VersionAwareHttpGraphSubjectsTest.java
  15. +2 −2 fcrepo-http-commons/src/main/java/org/fcrepo/http/commons/api/rdf/HttpGraphSubjects.java
  16. +9 −9 fcrepo-http-commons/src/test/java/org/fcrepo/http/commons/api/rdf/HttpGraphSubjectsTest.java
  17. +2 −2 fcrepo-kernel-api/src/main/java/org/fcrepo/kernel/rdf/IdentifierTranslator.java
  18. +2 −2 fcrepo-kernel-api/src/main/java/org/fcrepo/kernel/utils/NodePropertiesTools.java
  19. +1 −1 fcrepo-kernel/src/main/java/org/fcrepo/kernel/FedoraResourceImpl.java
  20. +2 −2 fcrepo-kernel/src/main/java/org/fcrepo/kernel/rdf/JcrRdfTools.java
  21. +2 −2 fcrepo-kernel/src/main/java/org/fcrepo/kernel/rdf/impl/DefaultGraphSubjects.java
  22. +1 −1 fcrepo-kernel/src/main/java/org/fcrepo/kernel/rdf/impl/FixityRdfContext.java
  23. +2 −2 fcrepo-kernel/src/main/java/org/fcrepo/kernel/rdf/impl/HierarchyRdfContext.java
  24. +1 −1 fcrepo-kernel/src/main/java/org/fcrepo/kernel/rdf/impl/JcrGraphProperties.java
  25. +1 −1 fcrepo-kernel/src/main/java/org/fcrepo/kernel/rdf/impl/NodeRdfContext.java
  26. +2 −2 fcrepo-kernel/src/main/java/org/fcrepo/kernel/rdf/impl/PropertiesRdfContext.java
  27. +2 −2 fcrepo-kernel/src/main/java/org/fcrepo/kernel/rdf/impl/VersionsRdfContext.java
  28. +2 −2 fcrepo-kernel/src/main/java/org/fcrepo/kernel/rdf/impl/WorkspaceRdfContext.java
  29. +1 −1 fcrepo-kernel/src/main/java/org/fcrepo/kernel/rdf/impl/mappings/PropertyToTriple.java
  30. +1 −1 fcrepo-kernel/src/main/java/org/fcrepo/kernel/services/DatastreamServiceImpl.java
  31. +2 −2 fcrepo-kernel/src/main/java/org/fcrepo/kernel/utils/JcrPropertyStatementListener.java
  32. +1 −1 fcrepo-kernel/src/main/java/org/fcrepo/kernel/utils/iterators/PersistingRdfStreamConsumer.java
  33. +2 −2 fcrepo-kernel/src/test/java/org/fcrepo/integration/kernel/FedoraObjectIT.java
  34. +4 −4 fcrepo-kernel/src/test/java/org/fcrepo/integration/kernel/FedoraResourceImplIT.java
  35. +3 −3 fcrepo-kernel/src/test/java/org/fcrepo/kernel/FedoraResourceImplTest.java
  36. +9 −9 fcrepo-kernel/src/test/java/org/fcrepo/kernel/rdf/impl/DefaultGraphSubjectsTest.java
  37. +8 −8 fcrepo-kernel/src/test/java/org/fcrepo/kernel/rdf/impl/HierarchyRdfContextTest.java
  38. +3 −3 fcrepo-kernel/src/test/java/org/fcrepo/kernel/rdf/impl/JcrGraphPropertiesTest.java
  39. +1 −1 fcrepo-kernel/src/test/java/org/fcrepo/kernel/rdf/impl/NodeRdfContextTest.java
  40. +2 −2 fcrepo-kernel/src/test/java/org/fcrepo/kernel/rdf/impl/PropertiesRdfContextTest.java
  41. +7 −7 fcrepo-kernel/src/test/java/org/fcrepo/kernel/rdf/impl/WorkspaceRdfContextTest.java
  42. +1 −1 fcrepo-kernel/src/test/java/org/fcrepo/kernel/rdf/impl/mappings/PropertyToTripleTest.java
  43. +1 −1 fcrepo-kernel/src/test/java/org/fcrepo/kernel/services/DatastreamServiceTest.java
  44. +10 −10 fcrepo-kernel/src/test/java/org/fcrepo/kernel/utils/JcrPropertyStatementListenerTest.java
  45. +6 −6 fcrepo-kernel/src/test/java/org/fcrepo/kernel/utils/JcrRdfToolsTest.java
  46. +5 −5 fcrepo-kernel/src/test/java/org/fcrepo/kernel/utils/NodePropertiesToolsTest.java
  47. +2 −2 fcrepo-kernel/src/test/java/org/fcrepo/kernel/utils/iterators/PersistingRdfStreamConsumerTest.java
  48. +1 −1 fcrepo-kernel/src/test/java/org/fcrepo/kernel/utils/iterators/RdfAdderTest.java
  49. +1 −1 fcrepo-kernel/src/test/java/org/fcrepo/kernel/utils/iterators/RdfRemoverTest.java
  50. +1 −1 fcrepo-rss/src/main/java/org/fcrepo/syndication/RssResources.java
  51. +1 −1 fcrepo-rss/src/test/java/org/fcrepo/syndication/RssResourcesTest.java
  52. +1 −1 fcrepo-transform/src/main/java/org/fcrepo/transform/http/TransformResources.java
  53. +2 −2 fcrepo-transform/src/main/java/org/fcrepo/transform/sparql/JQLResultSet.java
  54. +1 −1 fcrepo-transform/src/test/java/org/fcrepo/integration/JQLConverterIT.java
  55. +1 −1 fcrepo-transform/src/test/java/org/fcrepo/integration/LDPathServiceIT.java
  56. +1 −1 fcrepo-transform/src/test/java/org/fcrepo/transform/http/TransformResourcesTest.java
  57. +2 −2 fcrepo-transform/src/test/java/org/fcrepo/transform/sparql/JQLResultSetTest.java
  58. +1 −1 fcrepo-webhooks/src/main/java/org/fcrepo/webhooks/WebhooksResources.java
  59. +1 −1 fcrepo-webhooks/src/test/java/org/fcrepo/webhooks/WebhooksResourcesTest.java
@@ -53,7 +53,7 @@ public Model createModelForResource(final FedoraResource resource,
final UriInfo uriInfo, final IdentifierTranslator graphSubjects)
throws RepositoryException {
final Model model = ModelFactory.createDefaultModel();
final Resource s = graphSubjects.getGraphSubject(resource.getNode().getPath());
final Resource s = graphSubjects.getSubject(resource.getNode().getPath());

if (resource.getNode().isNodeType(
FedoraJcrTypes.FEDORA_RESOURCE)) {
@@ -77,7 +77,7 @@ public void setUp() throws RepositoryException {
model = ModelFactory.createDefaultModel();
graphResource = model.createResource("/" + pathString);

when(graphSubjects.getGraphSubject(Matchers.anyString())).thenReturn(
when(graphSubjects.getSubject(Matchers.anyString())).thenReturn(
graphResource);
when(fedoraResource.getNode()).thenReturn(resourceNode);

@@ -122,7 +122,7 @@ protected Response getDatastreamContentResponse(final Datastream ds, final Strin

return builder.type(ds.getMimeType()).header(
"Link",
subjects.getGraphSubject(ds.getNode().getPath()) +
subjects.getSubject(ds.getNode().getPath()) +
";rel=\"meta\"").header("Accept-Ranges",
"bytes").cacheControl(cc).lastModified(date).tag(etag)
.header("Content-Disposition", contentDisposition)
@@ -245,7 +245,7 @@ public Response batchModify(@PathParam("path") final List<PathSegment> pathList,

final Model inputModel =
createDefaultModel().read(src,
subjects.getGraphSubject(resource.getNode().getPath()).toString(), format);
subjects.getSubject(resource.getNode().getPath()).toString(), format);

resource.replaceProperties(subjects, inputModel);
} else {
@@ -294,7 +294,7 @@ public Response batchModify(@PathParam("path") final List<PathSegment> pathList,
final HttpGraphSubjects subjects =
new HttpGraphSubjects(session, FedoraNodes.class, uriInfo);

return created(new URI(subjects.getGraphSubject(path).getURI())).build();
return created(new URI(subjects.getSubject(path).getURI())).build();

} finally {
session.logout();
@@ -152,7 +152,7 @@ public Response create(@PathParam("path")

session.save();
versionService.nodeUpdated(datastreamNode);
return created(new URI(subjects.getGraphSubject(datastreamNode.getNode(JCR_CONTENT).getPath()).getURI()))
return created(new URI(subjects.getSubject(datastreamNode.getNode(JCR_CONTENT).getPath()).getURI()))
.build();

} finally {
@@ -238,7 +238,7 @@ public Response modifyContent(@PathParam("path") final List<PathSegment> pathLis
uriInfo);

return created(
new URI(subjects.getGraphSubject(datastreamNode.getNode(JCR_CONTENT).getPath()).getURI()))
new URI(subjects.getSubject(datastreamNode.getNode(JCR_CONTENT).getPath()).getURI()))
.build();
}
return noContent().build();
@@ -136,7 +136,7 @@ public Triple apply(final String identifier) {

try {
final Node s =
subjects.getGraphSubject(identifier).asNode();
subjects.getSubject(identifier).asNode();
return Triple.create(pidsResult, HAS_MEMBER_OF_RESULT
.asNode(), s);
} catch (final RepositoryException e) {
@@ -94,7 +94,7 @@ public Response importObject(@PathParam("path") final List<PathSegment> pathList
serializers.getSerializer(format)
.deserialize(session, path, stream);
session.save();
return created(new URI(subjects.getGraphSubject(path).getURI())).build();
return created(new URI(subjects.getSubject(path).getURI())).build();
} finally {
session.logout();
}
@@ -189,7 +189,7 @@ public RdfStream describe(@PathParam("path") final List<PathSegment> pathList,
final RdfStream rdfStream =
resource.getTriples(subjects).concat(
resource.getHierarchyTriples(subjects)).session(session)
.topic(subjects.getGraphSubject(resource.getNode().getPath())
.topic(subjects.getSubject(resource.getNode().getPath())
.asNode());
if (realLimit != NO_MEMBER_PROPERTIES) {
final Node firstPage =
@@ -363,7 +363,7 @@ public Response createOrReplaceObjectRdf(

final Model inputModel =
createDefaultModel().read(requestBodyStream,
graphSubjects.getGraphSubject(resource.getNode().getPath()).toString(), format);
graphSubjects.getSubject(resource.getNode().getPath()).toString(), format);

resource.replaceProperties(graphSubjects, inputModel);
}
@@ -493,7 +493,7 @@ public Response createObject(@PathParam("path")

final Model inputModel =
createDefaultModel().read(requestBodyStream,
subjects.getGraphSubject(result.getNode().getPath()).toString(), format);
subjects.getSubject(result.getNode().getPath()).toString(), format);

result.replaceProperties(subjects, inputModel);
} else if (result instanceof Datastream) {
@@ -520,9 +520,9 @@ public Response createObject(@PathParam("path")

final URI location;
if (result.hasContent()) {
location = new URI(subjects.getGraphSubject(result.getNode().getNode(JCR_CONTENT).getPath()).getURI());
location = new URI(subjects.getSubject(result.getNode().getNode(JCR_CONTENT).getPath()).getURI());
} else {
location = new URI(subjects.getGraphSubject(result.getNode().getPath()).getURI());
location = new URI(subjects.getSubject(result.getNode().getPath()).getURI());
}

return created(location).entity(location.toString()).build();
@@ -620,7 +620,7 @@ public Response copyObject(@PathParam("path") final List<PathSegment> path,
}

final String destination =
subjects.getPathFromGraphSubject(ResourceFactory.createResource(destinationUri));
subjects.getPathFromSubject(ResourceFactory.createResource(destinationUri));

if (destination == null) {
return status(SC_BAD_GATEWAY).entity("Destination was not a valid resource path").build();
@@ -685,7 +685,7 @@ public Response moveObject(@PathParam("path") final List<PathSegment> pathList,
new HttpGraphSubjects(session, FedoraNodes.class, uriInfo);

final String destination =
subjects.getPathFromGraphSubject(ResourceFactory.createResource(destinationUri));
subjects.getPathFromSubject(ResourceFactory.createResource(destinationUri));

if (destination == null) {
return status(SC_BAD_GATEWAY).entity("Destination was not a valid resource path").build();
@@ -108,7 +108,7 @@ public RdfStream getVersionList(@PathParam("path")
final FedoraResource resource = nodeService.getObject(session, path);

return resource.getVersionTriples(nodeTranslator()).session(session).topic(
nodeTranslator().getGraphSubject(resource.getNode().getPath()).asNode());
nodeTranslator().getSubject(resource.getNode().getPath()).asNode());
}

/**
@@ -186,7 +186,7 @@ public RdfStream getVersion(@PathParam("path")
}
final FedoraResource resource = new FedoraResourceImpl(node);
return resource.getTriples(nodeTranslator()).session(session).topic(
nodeTranslator().getGraphSubject(resource.getNode().getPath()).asNode());
nodeTranslator().getSubject(resource.getNode().getPath()).asNode());
}

/**
@@ -120,7 +120,7 @@ public Response createWorkspace(@PathParam("path") final String path,
new HttpGraphSubjects(session.getRepository().login(path), FedoraNodes.class, uriInfo);


return created(new URI(subjects.getGraphSubject("/").getURI())).build();
return created(new URI(subjects.getSubject("/").getURI())).build();
} finally {
session.logout();
}
@@ -69,7 +69,7 @@ public Model createModelForResource(final FedoraResource resource,

final Model model = createDefaultModel();

final Resource s = graphSubjects.getGraphSubject(resource.getNode().getPath());
final Resource s = graphSubjects.getSubject(resource.getNode().getPath());

if (resource.getNode().getPrimaryNodeType().isNodeType(ROOT)) {
addRepositoryStatements(uriInfo, model, s);
@@ -96,7 +96,7 @@ public String getPathFromGraphSubject(@NotNull final String subjectUri) throws R
}

@Override
public Resource getGraphSubject(final String absPath) throws RepositoryException {
public Resource getSubject(final String absPath) throws RepositoryException {
if (absPath.contains("jcr:versionStorage")) {
final Node probableFrozenNode = internalSession.getNode(absPath);
if (probableFrozenNode.getPrimaryNodeType().getName().equals("nt:frozenNode")) {
@@ -106,7 +106,7 @@ public Resource getGraphSubject(final String absPath) throws RepositoryException
}
LOGGER.debug("{} was not a frozen node... no version-specific translation required", absPath);
}
return super.getGraphSubject(absPath);
return super.getSubject(absPath);
}

/**
@@ -102,7 +102,7 @@ public void shouldDecorateModeRootNodesWithRepositoryWideLinks()
when(mockNode.getPrimaryNodeType()).thenReturn(mockNodeType);
when(mockNode.getPath()).thenReturn("/");

final Resource graphSubject = mockSubjects.getGraphSubject(mockNode.getPath());
final Resource graphSubject = mockSubjects.getSubject(mockNode.getPath());

final Model model =
testObj.createModelForResource(mockResource, uriInfo, mockSubjects);
@@ -123,7 +123,7 @@ public void shouldDecorateNodesWithLinksToVersionsAndExport()
when(mockNode.getPath()).thenReturn("/some/path/to/object");

when(mockSerializers.keySet()).thenReturn(of("a", "b"));
final Resource graphSubject = mockSubjects.getGraphSubject(mockNode.getPath());
final Resource graphSubject = mockSubjects.getSubject(mockNode.getPath());

final Model model =
testObj.createModelForResource(mockResource, uriInfo, mockSubjects);
@@ -141,7 +141,7 @@ public void shouldDecorateDatastreamsWithLinksToFixityChecks()
when(mockNode.getPrimaryNodeType()).thenReturn(mockNodeType);
when(mockNode.getPath()).thenReturn("/some/path/to/datastream");
when(mockSerializers.keySet()).thenReturn(new HashSet<String>());
final Resource graphSubject = mockSubjects.getGraphSubject(mockNode.getPath());
final Resource graphSubject = mockSubjects.getSubject(mockNode.getPath());

final Model model =
testObj.createModelForResource(mockResource, uriInfo, mockSubjects);
@@ -159,7 +159,7 @@ public void shouldDecorateRootNodeWithCorrectResourceURI()
when(mockSerializers.keySet()).thenReturn(of("a"));
when(mockNode.getPath()).thenReturn("/");

final Resource graphSubject = mockSubjects.getGraphSubject(mockNode.getPath());
final Resource graphSubject = mockSubjects.getSubject(mockNode.getPath());
final Model model =
testObj.createModelForResource(mockResource, uriInfo,
mockSubjects);
@@ -178,7 +178,7 @@ public void shouldDecorateOtherNodesWithCorrectResourceURI()
when(mockSerializers.keySet()).thenReturn(of("a"));
when(mockNode.getPath()).thenReturn("/some/path/to/object");

final Resource graphSubject = mockSubjects.getGraphSubject(mockNode.getPath());
final Resource graphSubject = mockSubjects.getSubject(mockNode.getPath());
final Model model =
testObj.createModelForResource(mockResource, uriInfo,
mockSubjects);
@@ -71,7 +71,7 @@ public void testGetGraphSubject() throws RepositoryException {
final String uri = "http://localhost:8080/fcrepo/rest" + mockVersionableNode.getPath()
+ "/fcr:versions/" + mockFrozenNode.getIdentifier();

final Resource actual = testObj.getGraphSubject(mockFrozenNode.getPath());
final Resource actual = testObj.getSubject(mockFrozenNode.getPath());
assertEquals(uri, actual.getURI());
}

@@ -105,7 +105,7 @@ public void testGetGraphSubjectChildNode() throws RepositoryException {
when(mockWorkspace.getName()).thenReturn("default");
when(mockFrozenChildNode.getParent()).thenReturn(mockFrozenNode);

final Resource actual = testObj.getGraphSubject(mockFrozenChildNodePath);
final Resource actual = testObj.getSubject(mockFrozenChildNodePath);
assertEquals(uri, actual.getURI());
}

@@ -114,7 +114,7 @@ public void testGetGraphSubjectChildNode() throws RepositoryException {
public void testGetGraphSubjectForVersion() throws RepositoryException {
mockVersion(UUID.randomUUID().toString());

final Resource actual = testObj.getGraphSubject(mockFrozenNode.getPath());
final Resource actual = testObj.getSubject(mockFrozenNode.getPath());
assertEquals("http://localhost:8080/fcrepo/rest" + mockVersionableNode.getPath() + "/fcr:versions/"
+ mockFrozenNode.getIdentifier(), actual.getURI());
}
@@ -129,7 +129,7 @@ public void testGetNodeFromGraphSubjectForVersionByUUID() throws PathNotFoundExc
+ "/fcr:versions/" + mockFrozenNode.getIdentifier();
mockSubject(uri);

final String actual = testObj.getPathFromGraphSubject(mockSubject);
final String actual = testObj.getPathFromSubject(mockSubject);
assertEquals(mockFrozenNode.getPath(), actual);

}
@@ -153,7 +153,7 @@ public void testGetNodeFromGraphSubjectForVersionByLabel() throws PathNotFoundEx
+ "/fcr:versions/" + label;
mockSubject(uri);

final String actual = testObj.getPathFromGraphSubject(mockSubject);
final String actual = testObj.getPathFromSubject(mockSubject);
assertEquals(mockFrozenNode.getPath(), actual);
}

@@ -174,7 +174,7 @@ public void testGetNodeFromGraphSubjectForVersionChildByUUID() throws PathNotFou
when(mockSession.nodeExists(mockVersionChildNodePath)).thenReturn(true);
when(mockSession.getNode(mockVersionChildNodePath)).thenReturn(mockVersionChildNode);

final String actual = testObj.getPathFromGraphSubject(mockSubject);
final String actual = testObj.getPathFromSubject(mockSubject);
assertEquals(mockVersionChildNode.getPath(), actual);
}

@@ -101,7 +101,7 @@ public HttpGraphSubjects(final Session session, final Class<?> relativeTo, final
}

@Override
public Resource getGraphSubject(final String absPath)
public Resource getSubject(final String absPath)
throws RepositoryException {
final URI result =
nodesBuilder.buildFromMap(getPathMap(absPath));
@@ -124,7 +124,7 @@ private static String getResourceURI(final Resource subject) {
}

@Override
public String getPathFromGraphSubject(final Resource subject) throws RepositoryException {
public String getPathFromSubject(final Resource subject) throws RepositoryException {
final String subjectUri = getResourceURI(subject);
if (subjectUri == null) {
return null;
@@ -62,10 +62,10 @@ public void testGetGraphSubject() throws RepositoryException {
when(mockWorkspace.getName()).thenReturn("default");
when(mockSession.getWorkspace()).thenReturn(mockWorkspace);
when(mockNode.getSession()).thenReturn(mockSession);
Resource actual = testObj.getGraphSubject(mockNode.getPath());
Resource actual = testObj.getSubject(mockNode.getPath());
assertEquals(expected, actual.getURI());
when(mockNode.getPath()).thenReturn(testPath + "/jcr:content");
actual = testObj.getGraphSubject(mockNode.getPath());
actual = testObj.getSubject(mockNode.getPath());
assertEquals(expected + "/fcr:content", actual.getURI());
}

@@ -81,26 +81,26 @@ public void testGetNodeFromGraphSubject() throws PathNotFoundException,
when(mockSubject.getURI()).thenReturn(
"http://localhost:8080/fcrepo/rest" + testPath);
when(mockSubject.isURIResource()).thenReturn(true);
Node actual = mockSession.getNode(testObj.getPathFromGraphSubject(mockSubject));
Node actual = mockSession.getNode(testObj.getPathFromSubject(mockSubject));
verify(mockSession).getNode(testPath);
assertEquals(mockNode, actual);
// test a bad subject
when(mockSubject.getURI()).thenReturn(
"http://localhost:8080/fcrepo/rest2" + testPath + "/bad");
actual = mockSession.getNode(testObj.getPathFromGraphSubject(mockSubject));
actual = mockSession.getNode(testObj.getPathFromSubject(mockSubject));
assertEquals(null, actual);
// test a non-existent path
when(mockSubject.getURI()).thenReturn(
"http://localhost:8080/fcrepo/rest" + testPath + "/bad");
actual = mockSession.getNode(testObj.getPathFromGraphSubject(mockSubject));
actual = mockSession.getNode(testObj.getPathFromSubject(mockSubject));
assertEquals(null, actual);
// test a fcr:content path
when(mockSession.nodeExists(testPath + "/jcr:content")).thenReturn(true);
when(mockSubject.getURI())
.thenReturn(
"http://localhost:8080/fcrepo/rest" + testPath +
"/fcr:content");
actual = mockSession.getNode(testObj.getPathFromGraphSubject(mockSubject));
actual = mockSession.getNode(testObj.getPathFromSubject(mockSubject));
verify(mockSession).getNode(testPath + "/jcr:content");
}

@@ -110,7 +110,7 @@ public void testGetNodeFromGraphSubjectForNonJcrUrl() throws RepositoryException
when(mockWorkspace.getName()).thenReturn("default");
when(mockSession.getWorkspace()).thenReturn(mockWorkspace);

assertNull(mockSession.getNode(testObj.getPathFromGraphSubject(createResource("http://localhost:8080/fcrepo/rest/abc/fcr:export?format=jcr/xml"))));
assertNull(mockSession.getNode(testObj.getPathFromSubject(createResource("http://localhost:8080/fcrepo/rest/abc/fcr:export?format=jcr/xml"))));
}

@Test
@@ -148,12 +148,12 @@ public void testGetContext() {

@Test
public void testGetPathFromGraphSubject() throws RepositoryException {
assertEquals("/abc", testObj.getPathFromGraphSubject(ResourceFactory.createResource("http://localhost:8080/fcrepo/rest/abc")));
assertEquals("/abc", testObj.getPathFromSubject(ResourceFactory.createResource("http://localhost:8080/fcrepo/rest/abc")));
}

@Test
public void testGetPathFromGraphSubjectForNonJcrUrl() throws RepositoryException {
assertNull(testObj.getPathFromGraphSubject(ResourceFactory.createResource("who-knows-what-this-is")));
assertNull(testObj.getPathFromSubject(ResourceFactory.createResource("who-knows-what-this-is")));
}

protected static UriInfo getUriInfoImpl(final String path) {
Oops, something went wrong.

0 comments on commit ab1c49b

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