Search in sources :

Example 16 with PartSequence

use of org.jbei.ice.lib.entry.sequence.PartSequence in project ice by JBEI.

the class PartResource method updateSequence.

@PUT
@Produces(MediaType.APPLICATION_JSON)
@Path("/{id}/sequence")
public Response updateSequence(@PathParam("id") final String partId, @DefaultValue("false") @QueryParam("add") boolean add, @QueryParam("isPaste") boolean isPaste, FeaturedDNASequence sequence) {
    final String userId = requireUserId();
    log(userId, "updating sequence for entry " + partId);
    PartSequence partSequence = new PartSequence(userId, partId);
    partSequence.update(sequence, isPaste);
    return super.respond(true);
}
Also used : PartSequence(org.jbei.ice.lib.entry.sequence.PartSequence)

Aggregations

PartSequence (org.jbei.ice.lib.entry.sequence.PartSequence)16 IOException (java.io.IOException)6 ByteArrayInputStream (java.io.ByteArrayInputStream)3 EntryType (org.jbei.ice.lib.dto.entry.EntryType)3 SequenceInfo (org.jbei.ice.lib.dto.entry.SequenceInfo)3 InputStreamWrapper (org.jbei.ice.lib.entry.sequence.InputStreamWrapper)3 File (java.io.File)2 InputStream (java.io.InputStream)2 ArrayList (java.util.ArrayList)2 ZipOutputStream (java.util.zip.ZipOutputStream)2 FeaturedDNASequence (org.jbei.ice.lib.dto.FeaturedDNASequence)2 EntryFieldLabel (org.jbei.ice.lib.dto.entry.EntryFieldLabel)2 Entry (org.jbei.ice.storage.model.Entry)2 Files (java.nio.file.Files)1 Path (java.nio.file.Path)1 Paths (java.nio.file.Paths)1 List (java.util.List)1 Collectors (java.util.stream.Collectors)1 ZipEntry (java.util.zip.ZipEntry)1 javax.ws.rs (javax.ws.rs)1