Commits

Sam Adams  committed 4c1f88e

Include title in deposit response

  • Participants
  • Parent commits a464cf3

Comments (0)

Files changed (4)

File chempound-api/src/main/java/net/chempound/content/DefaultDepositResponse.java

 package net.chempound.content;
 
 import com.hp.hpl.jena.rdf.model.Model;
+import net.chempound.rdf.dc.DCUtils;
 import net.chempound.rdf.ore.AggregatedResource;
 
 import java.net.URI;
         return model;
     }
 
+    @Override
+    public String getTitle() {
+        return DCUtils.getTitle(model.getResource(uri.toString()));
+    }
 }

File chempound-api/src/main/java/net/chempound/content/DepositResponse.java

 
     Model getMetadataModel();
 
+    String getTitle();
 }

File chempound-app/src/test/java/net/chempound/integration/ChempoundIntegrationTest.java

 import net.chempound.storage.ResourceStore;
 import net.chempound.util.MimeType;
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 
 import java.io.IOException;
     }
 
     @Test
+    @Ignore("TODO")
+    public void shouldDepositItemWithSlug() throws Exception {
+
+    }
+
+    @Test
+    @Ignore("TODO")
+    public void shouldDepositItemWithoutSlug() throws Exception {
+
+    }
+
+    @Test
+    @Ignore("TODO")
+    public void shouldDepositItemsWithDuplicateSlug() throws Exception {
+
+    }
+
+    @Test
+    @Ignore("TODO")
+    public void shouldDepositItemWithResources() throws Exception {
+
+    }
+
+    @Test
+    @Ignore("TODO")
+    public void shouldDepositItemWithRemoteResources() throws Exception {
+
+    }
+
+    @Test
+    @Ignore("TODO")
+    public void shouldAddItemToParentCollectionOnDeposit() throws Exception {
+
+    }
+
+    @Test
+    @Ignore("TODO")
+    public void shouldDeleteItem() throws Exception {
+
+    }
+
+    @Test
+    @Ignore("TODO")
+    public void shouldDeleteResourcesFromItem() throws Exception {
+
+    }
+
+    @Test
+    @Ignore("TODO")
+    public void shouldRemoveItemFromParentCollectionWhenDeleting() throws Exception {
+
+    }
+
+    @Test
+    @Ignore("TODO")
+    public void shouldRecordTimestampOnDeposit() throws Exception {
+
+    }
+
+    @Test
+    @Ignore("TODO")
+    public void shouldSupportInProgressDeposit() throws Exception {
+
+    }
+
+    @Test
+    @Ignore("TODO")
+    public void shouldAddResourcesToInProgressDeposit() throws Exception {
+
+    }
+
+    @Test
+    @Ignore("TODO")
+    public void shouldUpdateMetadataForInProgressDeposit() throws Exception {
+
+    }
+
+    @Test
+    @Ignore("TODO")
+    public void shouldCompleteInProgressDeposit() throws Exception {
+
+    }
+
+    @Test
     public void testDepositEmptyItem() throws Exception {
         DepositRequest request = new DefaultDepositRequest();
         DepositResponse response = chempound.loadContent(request);

File chempound-webapp/src/main/java/net/chempound/webapp/sword/impl/DepositReceiptFactory.java

 
         receipt.setTreatment("Deposited.");
         receipt.setSplashUri(uri.toString());
+        receipt.getWrappedEntry().setTitle(response.getTitle());
 
         if (packaged) {
             for (final AggregatedResource resource : response.getResources()) {