KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > medor > query > jorm > TestJormPDHelper


1 /**
2  * MEDOR: Middleware Enabling Distributed Object Requests
3  *
4  * Copyright (C) 2001-2002 France Telecom R&D
5  * Contact: alexandre.lefebvre@rd.francetelecom.com
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20  *
21  * Initial developers: M. Alia, S. Chassande-Barrioz, A. Lefebvre
22  */

23 package org.objectweb.medor.query.jorm;
24
25 import org.objectweb.medor.jorm.TestJormHelper;
26
27 import java.util.ArrayList JavaDoc;
28
29 /**
30  * @author S.Chassande-Barrioz
31  */

32 public abstract class TestJormPDHelper extends TestJormHelper {
33
34     public TestJormPDHelper(String JavaDoc testName, String JavaDoc loggerName) {
35         super(testName, loggerName);
36     }
37
38     public Example getExtentOfA() {
39         ArrayList JavaDoc al = new ArrayList JavaDoc();
40         al.add("org/objectweb/medor/query/jorm/A.pd");
41         al.add("org/objectweb/medor/query/jorm/B.pd");
42         return getExtent(al, "org.objectweb.medor.query.jorm.A");
43     }
44     public Example getRewritedA() {
45         return getRewritten(getExtentOfA());
46     }
47
48     public Example getExtentOfB() {
49         ArrayList JavaDoc al = new ArrayList JavaDoc();
50         al.add("org/objectweb/medor/query/jorm/B.pd");
51         al.add("org/objectweb/medor/query/jorm/C.pd");
52         return getExtent(al, "org.objectweb.medor.query.jorm.B");
53     }
54     public Example getRewritedB() {
55         return getRewritten(getExtentOfB());
56     }
57
58     public Example getExtentOfC() {
59         ArrayList JavaDoc al = new ArrayList JavaDoc();
60         al.add("org/objectweb/medor/query/jorm/C.pd");
61         al.add("org/objectweb/medor/query/jorm/D.pd");
62         return getExtent(al, "org.objectweb.medor.query.jorm.C", "object1", null);
63     }
64     public Example getExtentOfD() {
65         ArrayList JavaDoc al = new ArrayList JavaDoc();
66         al.add("org/objectweb/medor/query/jorm/D.pd");
67         return getExtent(al, "org.objectweb.medor.query.jorm.D");
68     }
69     public Example getExtentOfD(String JavaDoc[] fn) {
70         ArrayList JavaDoc al = new ArrayList JavaDoc();
71         al.add("org/objectweb/medor/query/jorm/D.pd");
72         return getExtent(al, "org.objectweb.medor.query.jorm.D", TestJormHelper.DEFAULT_PNAME_FIELD_NAME + 1, fn);
73     }
74     public Example getRewritedD() {
75         return getRewritten(getExtentOfD());
76     }
77
78
79     public Example getExtentOfE() {
80         ArrayList JavaDoc al = new ArrayList JavaDoc();
81         al.add("org/objectweb/medor/query/jorm/E.pd");
82         return getExtent(al, "org.objectweb.medor.query.jorm.E");
83     }
84     public Example getRewritedE() {
85         return getRewritten(getExtentOfE());
86     }
87
88 }
89
Popular Tags