1 /*--------------------------------------------------------------------------
2 * Copyright 2009 utgenome.org
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *--------------------------------------------------------------------------*/
16 //--------------------------------------
17 // utgb-core Project
18 //
19 // OnGenomeDataVisitorBase.java
20 // Since: May 26, 2010
21 //
22 // $URL$
23 // $Author$
24 //--------------------------------------
25 package org.utgenome.gwt.utgb.client.bio;
26
27 /**
28 * Refereece implementation of the {@link OnGenomeDataVisitor}. This visitor redirects the visiting event to the parent
29 * class of each data type.
30 *
31 * @author leo
32 *
33 */
34 public class OnGenomeDataVisitorBase implements OnGenomeDataVisitor {
35
36 public void visitGap(Gap p) {
37 visitInterval(p);
38 }
39
40 public void visitGene(Gene g) {
41 visitRead(g);
42 }
43
44 public void visitBEDGene(BEDGene g) {
45 visitGene(g);
46 }
47
48 public void visitInterval(Interval interval) {
49 // do nothing in default
50 }
51
52 public void visitRead(Read r) {
53 visitInterval(r);
54 }
55
56 public void visitReadCoverage(ReadCoverage readCoverage) {
57 visitInterval(readCoverage);
58 }
59
60 public void visitSAMRead(SAMRead r) {
61 visitSAMReadLight(r);
62 }
63
64 public void visitSequence(ReferenceSequence referenceSequence) {
65
66 }
67
68 public void visitGraph(GraphData graph) {
69
70 }
71
72 public void visitSAMReadPair(SAMReadPair pair) {
73 visitSAMReadLight(pair.getFirst());
74 visitSAMReadLight(pair.getSecond());
75 }
76
77 public void visitSAMReadPairFragment(SAMReadPairFragment fragment) {
78 visitSAMReadLight(fragment.oneEnd);
79 visitGap(fragment.getGap());
80 }
81
82 public void visitReadList(ReadList readList) {
83
84 }
85
86 public void visitSAMReadLight(SAMReadLight r) {
87 visitInterval(r);
88 }
89
90 }