Skip to content
Permalink
Browse files

Fix fcrepo-http-api integration tests for Mac builds

Build issue resolved by using UUIDs instead of fixed names for test resources.
Fixed fcrepo-generator-dc integration tests for Mac builds by using UUIDs instead of fixed names for test resources.
Minor code cleanup, reducing compiler warnings.
  • Loading branch information...
ajs6f authored and awoods committed Oct 7, 2013
1 parent 1d7d0d0 commit 172fe46b436fd19b0bc44b923159870e1cafa983
Showing with 309 additions and 339 deletions.
  1. +12 −10 fcrepo-generator-dc/src/test/java/org/fcrepo/integration/generator/DublinCoreGeneratorIT.java
  2. +7 −7 fcrepo-http-api/src/main/java/org/fcrepo/http/api/FedoraContent.java
  3. +2 −2 fcrepo-http-api/src/main/java/org/fcrepo/http/api/FedoraDatastreams.java
  4. +1 −1 fcrepo-http-api/src/main/java/org/fcrepo/http/api/FedoraExport.java
  5. +7 −7 fcrepo-http-api/src/main/java/org/fcrepo/http/api/FedoraFieldSearch.java
  6. +1 −1 fcrepo-http-api/src/main/java/org/fcrepo/http/api/FedoraFixity.java
  7. +1 −1 fcrepo-http-api/src/main/java/org/fcrepo/http/api/FedoraIdentifiers.java
  8. +1 −1 fcrepo-http-api/src/main/java/org/fcrepo/http/api/FedoraImport.java
  9. +19 −22 fcrepo-http-api/src/main/java/org/fcrepo/http/api/FedoraNodes.java
  10. +1 −1 fcrepo-http-api/src/main/java/org/fcrepo/http/api/FedoraVersions.java
  11. +3 −3 fcrepo-http-api/src/main/java/org/fcrepo/http/api/repository/FedoraRepositoriesProperties.java
  12. +14 −12 fcrepo-http-api/src/main/java/org/fcrepo/http/api/repository/FedoraRepositoryBackup.java
  13. +16 −15 fcrepo-http-api/src/main/java/org/fcrepo/http/api/repository/FedoraRepositoryRestore.java
  14. +22 −22 fcrepo-http-api/src/main/java/org/fcrepo/http/api/repository/FedoraRepositoryWorkspaces.java
  15. +4 −4 fcrepo-http-api/src/main/java/org/fcrepo/http/api/url/HttpApiResources.java
  16. +0 −1 fcrepo-http-api/src/test/java/org/fcrepo/http/api/FedoraContentTest.java
  17. +0 −1 fcrepo-http-api/src/test/java/org/fcrepo/http/api/FedoraDatastreamsTest.java
  18. +2 −3 fcrepo-http-api/src/test/java/org/fcrepo/http/api/FedoraExportTest.java
  19. +0 −1 fcrepo-http-api/src/test/java/org/fcrepo/http/api/FedoraFieldSearchTest.java
  20. +0 −1 fcrepo-http-api/src/test/java/org/fcrepo/http/api/FedoraFixityTest.java
  21. +1 −1 fcrepo-http-api/src/test/java/org/fcrepo/http/api/FedoraIdentifiersTest.java
  22. +0 −1 fcrepo-http-api/src/test/java/org/fcrepo/http/api/FedoraImportTest.java
  23. +1 −3 fcrepo-http-api/src/test/java/org/fcrepo/http/api/FedoraNodesTest.java
  24. +0 −1 fcrepo-http-api/src/test/java/org/fcrepo/http/api/FedoraSitemapTest.java
  25. +2 −3 fcrepo-http-api/src/test/java/org/fcrepo/http/api/FedoraVersionsTest.java
  26. +0 −1 fcrepo-http-api/src/test/java/org/fcrepo/http/api/repository/FedoraRepositoriesPropertiesTest.java
  27. +13 −14 fcrepo-http-api/src/test/java/org/fcrepo/http/api/repository/FedoraRepositoryBackupTest.java
  28. +15 −15 fcrepo-http-api/src/test/java/org/fcrepo/http/api/repository/FedoraRepositoryRestoreTest.java
  29. +13 −12 fcrepo-http-api/src/test/java/org/fcrepo/http/api/repository/FedoraRepositoryWorkspacesTest.java
  30. +4 −5 fcrepo-http-api/src/test/java/org/fcrepo/http/api/url/HttpApiResourcesTest.java
  31. +5 −4 fcrepo-http-api/src/test/java/org/fcrepo/integration/http/api/FedoraBackupIT.java
  32. +8 −4 fcrepo-http-api/src/test/java/org/fcrepo/integration/http/api/FedoraContentIT.java
  33. +1 −1 fcrepo-http-api/src/test/java/org/fcrepo/integration/http/api/FedoraFieldSearchIT.java
  34. +1 −1 fcrepo-http-api/src/test/java/org/fcrepo/integration/http/api/FedoraFixityIT.java
  35. +1 −1 fcrepo-http-api/src/test/java/org/fcrepo/integration/http/api/FedoraIdentifiersIT.java
  36. +1 −1 fcrepo-http-api/src/test/java/org/fcrepo/integration/http/api/FedoraNamespacesIT.java
  37. +33 −25 fcrepo-http-api/src/test/java/org/fcrepo/integration/http/api/FedoraNodesIT.java
  38. +20 −14 fcrepo-http-api/src/test/java/org/fcrepo/integration/http/api/FedoraTransactionsIT.java
  39. +13 −12 fcrepo-http-api/src/test/java/org/fcrepo/integration/http/api/FedoraWorkspacesIT.java
  40. +16 −15 fcrepo-http-api/src/test/java/org/fcrepo/integration/http/api/ldp/LdprIT.java
  41. +3 −3 fcrepo-kernel/src/main/java/org/fcrepo/kernel/Datastream.java
  42. +3 −3 fcrepo-kernel/src/main/java/org/fcrepo/kernel/FedoraResource.java
  43. +2 −1 fcrepo-kernel/src/main/java/org/fcrepo/kernel/observer/SimpleObserver.java
  44. +1 −1 fcrepo-kernel/src/main/java/org/fcrepo/kernel/rdf/impl/DefaultGraphSubjects.java
  45. +1 −1 fcrepo-kernel/src/main/java/org/fcrepo/kernel/services/DatastreamService.java
  46. +1 −1 fcrepo-kernel/src/main/java/org/fcrepo/kernel/services/NodeService.java
  47. +1 −1 fcrepo-kernel/src/main/java/org/fcrepo/kernel/services/ObjectService.java
  48. +2 −2 fcrepo-kernel/src/main/java/org/fcrepo/kernel/services/RepositoryService.java
  49. +2 −2 fcrepo-kernel/src/main/java/org/fcrepo/kernel/services/policy/StoragePolicyDecisionPoint.java
  50. +1 −1 fcrepo-kernel/src/main/java/org/fcrepo/kernel/utils/JcrPropertyStatementListener.java
  51. +4 −4 fcrepo-kernel/src/main/java/org/fcrepo/kernel/utils/JcrRdfTools.java
  52. +1 −1 fcrepo-kernel/src/test/java/org/fcrepo/integration/kernel/observer/SimpleObserverIT.java
  53. +1 −1 fcrepo-kernel/src/test/java/org/fcrepo/integration/kernel/services/ObjectServiceIT.java
  54. +1 −3 fcrepo-kernel/src/test/java/org/fcrepo/kernel/DatastreamTest.java
  55. +1 −2 fcrepo-kernel/src/test/java/org/fcrepo/kernel/FedoraObjectTest.java
  56. +2 −2 fcrepo-kernel/src/test/java/org/fcrepo/kernel/FedoraResourceTest.java
  57. +0 −1 fcrepo-kernel/src/test/java/org/fcrepo/kernel/TransactionTest.java
  58. +0 −1 fcrepo-kernel/src/test/java/org/fcrepo/kernel/TxAwareSessionTest.java
  59. +0 −1 fcrepo-kernel/src/test/java/org/fcrepo/kernel/identifiers/UUIDPathMinterTest.java
  60. +0 −1 fcrepo-kernel/src/test/java/org/fcrepo/kernel/identifiers/UUIDPidMinterTest.java
  61. +0 −1 fcrepo-kernel/src/test/java/org/fcrepo/kernel/observer/DefaultFilterTest.java
  62. +0 −1 fcrepo-kernel/src/test/java/org/fcrepo/kernel/observer/FedoraEventTest.java
  63. +0 −1 fcrepo-kernel/src/test/java/org/fcrepo/kernel/observer/NOOPFilterTest.java
  64. +0 −2 fcrepo-kernel/src/test/java/org/fcrepo/kernel/observer/SimpleObserverTest.java
  65. +0 −1 fcrepo-kernel/src/test/java/org/fcrepo/kernel/rdf/SerializationUtilsTest.java
  66. +0 −1 fcrepo-kernel/src/test/java/org/fcrepo/kernel/rdf/impl/DefaultGraphSubjectsTest.java
  67. +1 −4 fcrepo-kernel/src/test/java/org/fcrepo/kernel/services/DatastreamServiceTest.java
  68. +0 −2 fcrepo-kernel/src/test/java/org/fcrepo/kernel/services/LowLevelStorageServiceTest.java
  69. +0 −2 fcrepo-kernel/src/test/java/org/fcrepo/kernel/services/NodeServiceTest.java
  70. +0 −2 fcrepo-kernel/src/test/java/org/fcrepo/kernel/services/ObjectServiceTest.java
  71. +1 −2 fcrepo-kernel/src/test/java/org/fcrepo/kernel/services/RepositoryServiceTest.java
  72. +0 −1 fcrepo-kernel/src/test/java/org/fcrepo/kernel/services/TransactionServiceTest.java
  73. +0 −2 fcrepo-kernel/src/test/java/org/fcrepo/kernel/services/functions/CacheLocalTransformTest.java
  74. +0 −1 fcrepo-kernel/src/test/java/org/fcrepo/kernel/services/functions/CheckCacheEntryFixityTest.java
  75. +1 −1 fcrepo-kernel/src/test/java/org/fcrepo/kernel/services/functions/GetBinaryKeyTest.java
  76. +1 −1 fcrepo-kernel/src/test/java/org/fcrepo/kernel/services/functions/GetCacheStoreTest.java
  77. +0 −1 fcrepo-kernel/src/test/java/org/fcrepo/kernel/services/functions/GetClusterConfigurationTest.java
  78. +0 −1 fcrepo-kernel/src/test/java/org/fcrepo/kernel/utils/EventIteratorTest.java
  79. +0 −1 fcrepo-kernel/src/test/java/org/fcrepo/kernel/utils/FedoraTypesUtilsTest.java
  80. +0 −1 fcrepo-kernel/src/test/java/org/fcrepo/kernel/utils/FixityInputStreamTest.java
  81. +0 −1 fcrepo-kernel/src/test/java/org/fcrepo/kernel/utils/FixityResultTest.java
  82. +6 −9 fcrepo-kernel/src/test/java/org/fcrepo/kernel/utils/JcrPropertyStatementListenerTest.java
  83. +2 −2 fcrepo-kernel/src/test/java/org/fcrepo/kernel/utils/JcrRdfToolsTest.java
  84. +0 −1 fcrepo-kernel/src/test/java/org/fcrepo/kernel/utils/NamespaceChangedStatementListenerTest.java
  85. +0 −1 fcrepo-kernel/src/test/java/org/fcrepo/kernel/utils/NodeIteratortest.java
  86. +0 −1 fcrepo-kernel/src/test/java/org/fcrepo/kernel/utils/NodePropertiesToolsTest.java
  87. +0 −1 fcrepo-kernel/src/test/java/org/fcrepo/kernel/utils/PropertyIteratorTest.java
  88. +0 −1 fcrepo-kernel/src/test/java/org/fcrepo/kernel/utils/TestHelpers.java
  89. +0 −1 fcrepo-kernel/src/test/java/org/fcrepo/kernel/utils/impl/ChainingCacheStoreEntryTest.java
  90. +5 −5 fcrepo-transform/src/main/java/org/fcrepo/transform/TransformationFactory.java
  91. +4 −4 fcrepo-transform/src/main/java/org/fcrepo/transform/http/FedoraTransform.java
@@ -16,6 +16,8 @@

package org.fcrepo.integration.generator;

import static java.lang.System.err;
import static java.util.UUID.randomUUID;
import static java.util.regex.Pattern.DOTALL;
import static java.util.regex.Pattern.compile;
import static javax.ws.rs.core.MediaType.TEXT_XML;
@@ -25,7 +27,6 @@
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPatch;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.BasicHttpEntity;
import org.apache.http.util.EntityUtils;
import org.junit.Test;
@@ -42,8 +43,8 @@ public void testJcrPropertiesBasedOaiDc() throws Exception {
assertEquals(201, status);
final HttpPatch post = new HttpPatch(serverAddress + "DublinCoreTest1");
post.setHeader("Content-Type", "application/sparql-update");
BasicHttpEntity entity = new BasicHttpEntity();
String subjectURI = serverAddress + "DublinCoreTest1";
final BasicHttpEntity entity = new BasicHttpEntity();
final String subjectURI = serverAddress + "DublinCoreTest1";
entity.setContent(new ByteArrayInputStream(
("INSERT { <" + subjectURI + "> <http://purl.org/dc/terms/identifier> \"this is an identifier\" } WHERE {}")
.getBytes()));
@@ -67,20 +68,21 @@ public void testJcrPropertiesBasedOaiDc() throws Exception {

@Test
public void testWellKnownPathOaiDc() throws Exception {
HttpResponse response =
client.execute(postObjMethod("DublinCoreTest2"));

final String pid = randomUUID().toString();

HttpResponse response = client.execute(postObjMethod(pid));
assertEquals(201, response.getStatusLine().getStatusCode());
response =
client.execute(postDSMethod("DublinCoreTest2", "DC",
"marbles for everyone"));
int status = response.getStatusLine().getStatusCode();
client.execute(postDSMethod(pid, "DC", "marbles for everyone"));
final int status = response.getStatusLine().getStatusCode();
if (status != 201) {
System.err.println(EntityUtils.toString(response.getEntity()));
err.println(EntityUtils.toString(response.getEntity()));
}
assertEquals(201, status);

final HttpGet getWorstCaseOaiMethod =
new HttpGet(serverOAIAddress + "DublinCoreTest2/oai:dc");
new HttpGet(serverOAIAddress + pid + "/oai:dc");
getWorstCaseOaiMethod.setHeader("Accept", TEXT_XML);
response = client.execute(getWorstCaseOaiMethod);
assertEquals(200, response.getStatusLine().getStatusCode());
@@ -19,6 +19,7 @@
import static javax.ws.rs.core.MediaType.APPLICATION_OCTET_STREAM_TYPE;
import static javax.ws.rs.core.Response.created;
import static javax.ws.rs.core.Response.noContent;
import static org.modeshape.jcr.api.JcrConstants.JCR_CONTENT;
import static org.slf4j.LoggerFactory.getLogger;

import java.io.IOException;
@@ -83,7 +84,7 @@
/**
* Create an anonymous DS with a newly minted name and content from request
* body
*
*
* @param pathList
* @throws RepositoryException
*/
@@ -108,7 +109,7 @@ public Response create(@PathParam("path")
}

logger.debug("create Datastream {}", path);
final Throwable exception = null;

try {
final URI checksumURI;

@@ -130,9 +131,8 @@ public Response create(@PathParam("path")
session.save();
return created(
new URI(subjects.getGraphSubject(
datastreamNode
.getNode(JcrConstants.JCR_CONTENT))
.getURI())).build();
datastreamNode.getNode(JCR_CONTENT)).getURI()))
.build();

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

/**
* Modify an existing datastream's content
*
*
* @param pathList
* @param requestContentType Content-Type header
* @param requestBodyStream Binary blob
@@ -212,7 +212,7 @@ public Response modifyContent(@PathParam("path")

/**
* Get the binary content of a datastream
*
*
* @param pathList
* @return Binary blob
* @throws RepositoryException
@@ -52,10 +52,10 @@
import javax.ws.rs.core.Response;

import org.fcrepo.http.commons.AbstractResource;
import org.fcrepo.kernel.Datastream;
import org.fcrepo.http.commons.api.rdf.HttpGraphSubjects;
import org.fcrepo.kernel.exception.InvalidChecksumException;
import org.fcrepo.http.commons.session.InjectedSession;
import org.fcrepo.kernel.Datastream;
import org.fcrepo.kernel.exception.InvalidChecksumException;
import org.fcrepo.kernel.utils.ContentDigest;
import org.slf4j.Logger;
import org.springframework.context.annotation.Scope;
@@ -35,9 +35,9 @@
import javax.ws.rs.core.StreamingOutput;

import org.fcrepo.http.commons.AbstractResource;
import org.fcrepo.http.commons.session.InjectedSession;
import org.fcrepo.serialization.FedoraObjectSerializer;
import org.fcrepo.serialization.SerializerUtil;
import org.fcrepo.http.commons.session.InjectedSession;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
@@ -21,6 +21,13 @@
import static javax.ws.rs.core.MediaType.TEXT_HTML;
import static javax.ws.rs.core.Response.status;
import static javax.ws.rs.core.Response.Status.BAD_REQUEST;
import static org.fcrepo.http.commons.domain.RDFMediaType.N3;
import static org.fcrepo.http.commons.domain.RDFMediaType.N3_ALT1;
import static org.fcrepo.http.commons.domain.RDFMediaType.N3_ALT2;
import static org.fcrepo.http.commons.domain.RDFMediaType.NTRIPLES;
import static org.fcrepo.http.commons.domain.RDFMediaType.RDF_JSON;
import static org.fcrepo.http.commons.domain.RDFMediaType.RDF_XML;
import static org.fcrepo.http.commons.domain.RDFMediaType.TURTLE;
import static org.fcrepo.kernel.RdfLexicon.FIRST_PAGE;
import static org.fcrepo.kernel.RdfLexicon.NEXT_PAGE;
import static org.fcrepo.kernel.RdfLexicon.PAGE;
@@ -30,13 +37,6 @@
import static org.fcrepo.kernel.RdfLexicon.SEARCH_OFFSET;
import static org.fcrepo.kernel.RdfLexicon.SEARCH_PAGE;
import static org.fcrepo.kernel.RdfLexicon.SEARCH_TERMS;
import static org.fcrepo.http.commons.domain.RDFMediaType.N3;
import static org.fcrepo.http.commons.domain.RDFMediaType.N3_ALT1;
import static org.fcrepo.http.commons.domain.RDFMediaType.N3_ALT2;
import static org.fcrepo.http.commons.domain.RDFMediaType.NTRIPLES;
import static org.fcrepo.http.commons.domain.RDFMediaType.RDF_JSON;
import static org.fcrepo.http.commons.domain.RDFMediaType.RDF_XML;
import static org.fcrepo.http.commons.domain.RDFMediaType.TURTLE;
import static org.slf4j.LoggerFactory.getLogger;

import javax.jcr.RepositoryException;
@@ -39,9 +39,9 @@
import javax.ws.rs.core.UriInfo;

import org.fcrepo.http.commons.AbstractResource;
import org.fcrepo.kernel.Datastream;
import org.fcrepo.http.commons.api.rdf.HttpGraphSubjects;
import org.fcrepo.http.commons.session.InjectedSession;
import org.fcrepo.kernel.Datastream;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

@@ -24,14 +24,14 @@
import static com.hp.hpl.jena.rdf.model.ResourceFactory.createResource;
import static com.hp.hpl.jena.update.GraphStoreFactory.create;
import static javax.ws.rs.core.MediaType.TEXT_HTML;
import static org.fcrepo.kernel.RdfLexicon.HAS_MEMBER_OF_RESULT;
import static org.fcrepo.http.commons.domain.RDFMediaType.N3;
import static org.fcrepo.http.commons.domain.RDFMediaType.N3_ALT1;
import static org.fcrepo.http.commons.domain.RDFMediaType.N3_ALT2;
import static org.fcrepo.http.commons.domain.RDFMediaType.NTRIPLES;
import static org.fcrepo.http.commons.domain.RDFMediaType.RDF_JSON;
import static org.fcrepo.http.commons.domain.RDFMediaType.RDF_XML;
import static org.fcrepo.http.commons.domain.RDFMediaType.TURTLE;
import static org.fcrepo.kernel.RdfLexicon.HAS_MEMBER_OF_RESULT;

import java.util.Collection;
import java.util.List;
@@ -37,9 +37,9 @@

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.exception.InvalidChecksumException;
import org.fcrepo.serialization.SerializerUtil;
import org.fcrepo.http.commons.session.InjectedSession;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
@@ -29,16 +29,16 @@
import static org.apache.http.HttpStatus.SC_NO_CONTENT;
import static org.apache.jena.riot.WebContent.contentTypeSPARQLUpdate;
import static org.apache.jena.riot.WebContent.contentTypeToLang;
import static org.fcrepo.kernel.RdfLexicon.FIRST_PAGE;
import static org.fcrepo.kernel.RdfLexicon.HAS_CHILD_COUNT;
import static org.fcrepo.kernel.RdfLexicon.NEXT_PAGE;
import static org.fcrepo.http.commons.domain.RDFMediaType.N3;
import static org.fcrepo.http.commons.domain.RDFMediaType.N3_ALT1;
import static org.fcrepo.http.commons.domain.RDFMediaType.N3_ALT2;
import static org.fcrepo.http.commons.domain.RDFMediaType.NTRIPLES;
import static org.fcrepo.http.commons.domain.RDFMediaType.RDF_JSON;
import static org.fcrepo.http.commons.domain.RDFMediaType.RDF_XML;
import static org.fcrepo.http.commons.domain.RDFMediaType.TURTLE;
import static org.fcrepo.kernel.RdfLexicon.FIRST_PAGE;
import static org.fcrepo.kernel.RdfLexicon.HAS_CHILD_COUNT;
import static org.fcrepo.kernel.RdfLexicon.NEXT_PAGE;
import static org.fcrepo.kernel.rdf.GraphProperties.INLINED_RESOURCES_MODEL;
import static org.fcrepo.kernel.rdf.GraphProperties.PROBLEMS_MODEL_NAME;
import static org.slf4j.LoggerFactory.getLogger;
@@ -50,7 +50,6 @@
import java.util.Date;
import java.util.List;

import javax.jcr.Node;
import javax.jcr.RepositoryException;
import javax.jcr.Session;
import javax.servlet.http.HttpServletResponse;
@@ -76,19 +75,17 @@
import javax.ws.rs.core.Response.ResponseBuilder;
import javax.ws.rs.core.UriInfo;

import com.hp.hpl.jena.rdf.model.ModelFactory;
import com.hp.hpl.jena.rdf.model.Resource;
import org.apache.commons.io.IOUtils;
import org.apache.jena.riot.Lang;
import org.apache.jena.riot.WebContent;
import org.fcrepo.http.commons.AbstractResource;
import org.fcrepo.kernel.Datastream;
import org.fcrepo.kernel.FedoraResource;
import org.fcrepo.http.commons.api.rdf.HttpGraphSubjects;
import org.fcrepo.kernel.exception.InvalidChecksumException;
import org.fcrepo.http.commons.domain.PATCH;
import org.fcrepo.http.commons.session.InjectedSession;
import org.fcrepo.jcr.FedoraJcrTypes;
import org.fcrepo.kernel.Datastream;
import org.fcrepo.kernel.FedoraResource;
import org.fcrepo.kernel.exception.InvalidChecksumException;
import org.modeshape.jcr.api.JcrConstants;
import org.slf4j.Logger;
import org.springframework.context.annotation.Scope;
@@ -97,6 +94,8 @@
import com.codahale.metrics.annotation.Timed;
import com.hp.hpl.jena.query.Dataset;
import com.hp.hpl.jena.rdf.model.Model;
import com.hp.hpl.jena.rdf.model.ModelFactory;
import com.hp.hpl.jena.rdf.model.Resource;

/**
* CRUD operations on Fedora Nodes
@@ -113,7 +112,7 @@

/**
* Retrieve the node profile
*
*
* @param pathList
* @param offset with limit, control the pagination window of details for
* child nodes
@@ -133,7 +132,7 @@ public Dataset describe(@PathParam("path") final List<PathSegment> pathList,
@QueryParam("limit") @DefaultValue("-1") final int limit,
@QueryParam("non-member-properties") final String nonMemberProperties,
@Context final Request request,
@Context HttpServletResponse servletResponse,
@Context final HttpServletResponse servletResponse,
@Context final UriInfo uriInfo) throws RepositoryException, IOException {
final String path = toPath(pathList);
logger.trace("Getting profile for {}", path);
@@ -179,7 +178,7 @@ public Dataset describe(@PathParam("path") final List<PathSegment> pathList,
.contains(subjects.getGraphSubject(resource.getNode()),
HAS_CHILD_COUNT)) {

Model requestModel = ModelFactory.createDefaultModel();
final Model requestModel = ModelFactory.createDefaultModel();

final long childCount = treeModel
.listObjectsOfProperty(subjects.getGraphSubject(resource.getNode()), HAS_CHILD_COUNT)
@@ -231,7 +230,7 @@ public Dataset describe(@PathParam("path") final List<PathSegment> pathList,

/**
* Update an object using SPARQL-UPDATE
*
*
* @param pathList
* @return 201
* @throws RepositoryException
@@ -275,10 +274,10 @@ public Response updateSparql(@PathParam("path")
throw new WebApplicationException(builder.build());
}

Dataset properties = resource.updatePropertiesDataset(new HttpGraphSubjects(
final Dataset properties = resource.updatePropertiesDataset(new HttpGraphSubjects(
session, FedoraNodes.class, uriInfo), IOUtils
.toString(requestBodyStream));
Model problems = properties.getNamedModel(PROBLEMS_MODEL_NAME);
final Model problems = properties.getNamedModel(PROBLEMS_MODEL_NAME);
if (problems.size() > 0) {
logger.info(
"Found these problems updating the properties for {}: {}",
@@ -369,7 +368,7 @@ public Response createOrReplaceObjectRdf(

/**
* Creates a new object.
*
*
* @param pathList
* @return 201
* @throws RepositoryException
@@ -487,11 +486,9 @@ public Response createObject(@PathParam("path")
result.replacePropertiesDataset(subjects, inputModel);
} else if (result instanceof Datastream) {

final Node node =
datastreamService.createDatastreamNode(session, newObjectPath,
contentTypeString, requestBodyStream,
checksumURI);

datastreamService.createDatastreamNode(session,
newObjectPath, contentTypeString,
requestBodyStream, checksumURI);

}
}
@@ -518,7 +515,7 @@ public Response createObject(@PathParam("path")

/**
* Deletes an object.
*
*
* @param path
* @return
* @throws RepositoryException
@@ -47,10 +47,10 @@
import javax.ws.rs.core.Variant;

import org.fcrepo.http.commons.AbstractResource;
import org.fcrepo.kernel.FedoraResource;
import org.fcrepo.http.commons.api.rdf.HttpGraphSubjects;
import org.fcrepo.http.commons.responses.GraphStoreStreamingOutput;
import org.fcrepo.http.commons.session.InjectedSession;
import org.fcrepo.kernel.FedoraResource;
import org.slf4j.Logger;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
@@ -33,12 +33,12 @@

import org.apache.commons.io.IOUtils;
import org.apache.jena.riot.WebContent;
import org.fcrepo.http.commons.AbstractResource;
import org.fcrepo.kernel.FedoraResource;
import org.fcrepo.http.api.FedoraNodes;
import org.fcrepo.http.commons.AbstractResource;
import org.fcrepo.http.commons.api.rdf.HttpGraphSubjects;
import org.fcrepo.kernel.rdf.GraphProperties;
import org.fcrepo.http.commons.session.InjectedSession;
import org.fcrepo.kernel.FedoraResource;
import org.fcrepo.kernel.rdf.GraphProperties;
import org.slf4j.Logger;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
Oops, something went wrong.

0 comments on commit 172fe46

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