Project

General

Profile

Download (2.77 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2014 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9
package eu.etaxonomy.cdm.api.service.molecular;
10

    
11
import java.util.Collection;
12
import java.util.Map;
13
import java.util.UUID;
14

    
15
import eu.etaxonomy.cdm.api.service.DeleteResult;
16
import eu.etaxonomy.cdm.api.service.IAnnotatableService;
17
import eu.etaxonomy.cdm.api.service.UpdateResult;
18
import eu.etaxonomy.cdm.model.molecular.AmplificationResult;
19
import eu.etaxonomy.cdm.model.molecular.Sequence;
20
import eu.etaxonomy.cdm.model.molecular.SingleRead;
21

    
22
/**
23
 * @author pplitzner
24
 * @since 11.03.2014
25
 *
26
 */
27
public interface ISequenceService extends IAnnotatableService<Sequence>{
28

    
29
    /**
30
     * Moves the given {@link SingleRead} from one {@link Sequence} to another.
31
     * @param from the Sequence from which the SingleRead will be removed
32
     * @param to the Sequence to which the SingleRead will be added
33
     * @param singleRead the SingleRead to move
34
     * @return <code>true</code> if successfully moved, <code>false</code> otherwise
35
     */
36
    public UpdateResult moveSingleRead(Sequence from, Sequence to, SingleRead singleRead);
37

    
38

    
39
    /**
40
     * @param fromUuid
41
     * @param toUuid
42
     * @param singleReadUuid
43
     * @return
44
     */
45
    public UpdateResult moveSingleRead(UUID fromUuid, UUID toUuid, UUID singleReadUuid);
46

    
47

    
48
    /**
49
     * Creates and returns a map with {@link SingleRead}s as keys.
50
     * The value for each key is a list of those {@link Sequence}s that link to this SingleRead.
51
     * @return a map of SingleReads as keys and the Sequences linking to them
52
     */
53
    public Map<SingleRead, Collection<Sequence>> getSingleReadSequencesMap();
54

    
55
    /**
56
     * Deletes a {@link SingleRead} from the given {@link Sequence} and its {@link AmplificationResult}.
57
     * @param singleRead the single read to delete
58
     * @param sequence the sequence to which the single read belongs
59
     * @return the {@link DeleteResult} which holds information about the outcome of this operation
60
     */
61
    public DeleteResult deleteSingleRead(SingleRead singleRead, Sequence sequence);
62

    
63
    /**
64
     * Deletes a {@link SingleRead} from the given {@link Sequence} and its {@link AmplificationResult},
65
     * by first loading the corresponding uuids and then calling {@link #deleteSingleRead(SingleRead, Sequence) deleteSingleRead}
66
     * @param singleReadUuid uuid of the single read to delete
67
     * @param sequenceUuid uuid of the sequence to which the single read belongs
68
     * @return the {@link DeleteResult} which holds information about the outcome of this operation
69
     */
70
    public DeleteResult deleteSingleRead(UUID singleReadUuid, UUID sequenceUuid);
71

    
72
}
(4-4/6)