Skip to content

Commit

Permalink
changed objectPath to uppercase
Browse files Browse the repository at this point in the history
  • Loading branch information
fasseg committed Mar 6, 2013
1 parent 6287990 commit 8f0a94a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Expand Up @@ -5,7 +5,7 @@
import static javax.ws.rs.core.MediaType.APPLICATION_JSON;
import static javax.ws.rs.core.MediaType.TEXT_XML;
import static javax.ws.rs.core.Response.ok;
import static org.fcrepo.services.PathService.objectPath;
import static org.fcrepo.services.PathService.OBJECT_PATH;

import java.io.IOException;

Expand Down Expand Up @@ -89,7 +89,7 @@ public DescribeRepository describe() throws LoginException,
DescribeRepository description = new DescribeRepository();
description.repositoryBaseURL = uriInfo.getBaseUri();
description.sampleOAIURL =
uriInfo.getBaseUriBuilder().path(objectPath + "/123/oai_dc")
uriInfo.getBaseUriBuilder().path(OBJECT_PATH + "/123/oai_dc")
.build();
description.repositorySize = getRepositorySize(session);
description.numberOfObjects =
Expand Down
Expand Up @@ -12,7 +12,7 @@
*/
public class PathService {

public final static String objectPath = "/objects";
public final static String OBJECT_PATH = "/objects";

private static final Logger logger = LoggerFactory
.getLogger(DatastreamService.class);
Expand All @@ -23,7 +23,7 @@ public class PathService {
*/
public static String getObjectJcrNodePath(String pid) {
logger.trace("Executing getObjectJcrNodePath() with pid: " + pid);
return objectPath + "/" + pid;
return OBJECT_PATH + "/" + pid;
}

/**
Expand Down
Expand Up @@ -5,21 +5,21 @@

import static org.fcrepo.services.PathService.getDatastreamJcrNodePath;
import static org.fcrepo.services.PathService.getObjectJcrNodePath;
import static org.fcrepo.services.PathService.objectPath;
import static org.fcrepo.services.PathService.OBJECT_PATH;
import static org.junit.Assert.assertEquals;

public class PathServiceTest {

@Test
public void testGetObjectJcrNodePath() throws Exception {
new PathService();
assertEquals(objectPath + "/test:123", getObjectJcrNodePath("test:123"));
assertEquals(OBJECT_PATH + "/test:123", getObjectJcrNodePath("test:123"));
}

@Test
public void testGetDatastreamJcrNodePath() throws Exception {
new PathService();
assertEquals(objectPath + "/test:123/asdf", getDatastreamJcrNodePath(
assertEquals(OBJECT_PATH + "/test:123/asdf", getDatastreamJcrNodePath(
"test:123", "asdf"));
}
}
Expand Up @@ -5,7 +5,7 @@
import static javax.ws.rs.core.MediaType.APPLICATION_JSON;
import static javax.ws.rs.core.MediaType.TEXT_XML;
import static javax.ws.rs.core.Response.ok;
import static org.fcrepo.services.PathService.objectPath;
import static org.fcrepo.services.PathService.OBJECT_PATH;

import java.io.IOException;

Expand Down Expand Up @@ -89,7 +89,7 @@ public DescribeRepository describe() throws LoginException,
DescribeRepository description = new DescribeRepository();
description.repositoryBaseURL = uriInfo.getBaseUri();
description.sampleOAIURL =
uriInfo.getBaseUriBuilder().path(objectPath + "/123/oai_dc")
uriInfo.getBaseUriBuilder().path(OBJECT_PATH + "/123/oai_dc")
.build();
description.repositorySize = getRepositorySize(session);
description.numberOfObjects =
Expand Down

0 comments on commit 8f0a94a

Please sign in to comment.