Hillrunner2008 / mydas

Automatically exported from code.google.com/p/mydas
0 stars 0 forks source link

Error handling for sequence command is not implemented #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. When using sequence command, ask for an unknown segment
2. When using sequence command, ask for limits out of bounds

What is the expected output? What do you see instead?
1. For unknown segments in annotation servers, an UNKNOWNSEGMENT should be 
reported
2. For unknown segments in reference servers, an ERRORSEGMENT should be reported
3. For both annotation and reference servers, an ERRORSEGMENT should be 
reported when range is completely out of bounds. When the start is ok but the 
stop is beyond limits, the sequence from the start to the actual end should be 
reported

What do you see instead?
A Java exception

Original issue reported on code.google.com by leylaj...@gmail.com on 29 Jul 2010 at 3:36

GoogleCodeExporter commented 9 years ago
Some discussions with Andy Jenkinson about error handling:

I'm not sure I agree with point 5 as I'm not sure it is necessary to allow 
position 0. Positional features are always returned, no?

On 29 Jul 2010, at 17:09, Leyla Garcia wrote:

> Hi Andy,
>
> Here is a summary just to be sure we covered all:
>
> 1. When start and stop are both completely out of bounds, an ERROR_SEGMENT 
will be reported
> 2. When start is ok but stop is beyond the limits, what exists between start 
and the actual end will be reported (no error here) in all cases (type, 
features, and sequence)
> 3. When start or stop are negative values, an ERROR_SEGMENT will be reported
> 4. When start is greater than stop, an ERROR_SEGMENT will be reported
> 5. For features and types, position 0 is allowed and is related to 
non-positional features. For sequence, position 0 has no sense so , an 
ERROR_SEGMENT will be reported
> 6. When the segment is unknown, annotation servers will report an 
UNKNOWNSEGMENT
> 7. When the segment is unknown, reference servers will report an ERRORSEGMENT
> 8. For unknown feature_id, an UNKNOWNFEATURE will be reported
>
> Am I missing/misunderstanding something? 

Original comment by leylaj...@gmail.com on 30 Jul 2010 at 3:52

GoogleCodeExporter commented 9 years ago
Solution:

1. New interface: SequenceReporter to represent found and error sequences
2. SequenceReporter class renamed as FoundSequenceReporter, implements 
SequenceReporter interface
3. New class: ErrorSequenceReporter, implements SequenceReporter, used to 
report error segments when range are unbounded. It does no matter whether it is 
an annotation or a reference server.
4. DasCommandManager changed: The method sequenceCommand serializes an error or 
a found sequence depending on the SequenceReporter type. The method 
getSequences takes care of the error handling when limits are unbounded. The 
SEGMENT_RANGE_PATTERN static class variable now allows negative values
5. SegmentQuery changed: Since the pattern SEGMENT_RANGE_PATTERN changed, also 
the constructor of this class (matching groups changed)

Note: currently it is not possible yet to retrieve sequences when the start is 
ok and the stop is unbounded, that is still under development

Original comment by leylaj...@gmail.com on 30 Jul 2010 at 4:09

GoogleCodeExporter commented 9 years ago
Some more changes:

6. DasCommandManager, method getSequences: Now it is possible to retrieve 
sequences when the start is ok and the stop is unbounded
7. FoundSequenceReporter, method getStop: It will return the stopCoordinate 
whenever a stopSegment is specified and it is greater than the actual stop
8. DasAnnotatedSegment, method getFeatures (int, int): Now non-positional 
features are always included (it could change depending on DAS mailing list 
discussion, by now it is in accordance to DAS spec 1.6, draft 6)

Original comment by leylaj...@gmail.com on 2 Aug 2010 at 2:03

GoogleCodeExporter commented 9 years ago

Original comment by leylaj...@gmail.com on 25 Feb 2011 at 12:01