1 /*--------------------------------------------------------------------------
\r
2 * Copyright 2009 Taro L. Saito
\r
4 * Licensed under the Apache License, Version 2.0 (the "License");
\r
5 * you may not use this file except in compliance with the License.
\r
6 * You may obtain a copy of the License at
\r
8 * http://www.apache.org/licenses/LICENSE-2.0
\r
10 * Unless required by applicable law or agreed to in writing, software
\r
11 * distributed under the License is distributed on an "AS IS" BASIS,
\r
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
13 * See the License for the specific language governing permissions and
\r
14 * limitations under the License.
\r
15 *--------------------------------------------------------------------------*/
\r
16 //--------------------------------------
\r
19 // RelationEventHandler.java
\r
20 // Since: May 14, 2009 12:39:42 PM
\r
22 // $URL: http://www.xerial.org/svn/project/XerialJ/trunk/xerial-core/src/main/java/org/xerial/lens/relation/query/AmoebaJoinHandler.java $
\r
24 //--------------------------------------
\r
25 package org.xerial.lens.relation.query;
\r
27 import org.xerial.lens.relation.Node;
\r
28 import org.xerial.lens.relation.schema.Schema;
\r
31 * Interface of the amoeba join result handler. The tree data will be consumed
\r
32 * in the depth-first manner, and newly found amoeba pair and tree nodes will be
\r
33 * reported in the DFS order.
\r
38 public interface AmoebaJoinHandler {
\r
41 * This method will be invoked once before the amoeba join process starts
\r
46 * Invoked when a new amoeba node pair specified in the query set is found
\r
50 * @param attributeNode
\r
53 public void newAmoeba(Schema schema, Node coreNode, Node attributeNode) throws Exception;
\r
56 * Invoked when leaving a node
\r
62 public void leaveNode(Schema schema, Node node) throws Exception;
\r
65 * Invoked when a text node belongs to a core node is found
\r
70 * text node may not contain a text value
\r
72 * text fragment data of the text node
\r
75 public void text(Schema schema, Node coreNode, Node textNode, String text) throws Exception;
\r
78 * Invoked when reading the input stream has finished
\r
80 public void finish();
\r