KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > websvc > wsdl > config > api > RootInterface


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.websvc.wsdl.config.api;
21
22 import org.netbeans.modules.schema2beans.BaseBean;
23
24 /**
25  * Interface representing the root of interfaces bean tree structure. Inspired
26  * by (and heavily copied from) CommonDDBean in web/ddapi
27  *
28  *<p><b><font color="red"><em>Important note: Do not provide an implementation of this interface!</em></font></b>
29  *</p>
30  *
31  * @author Peter Williams
32  */

33 public interface RootInterface extends CommonDDBean {
34     /**
35      * Used in {@link #merge} method.<br>
36      * The result of merge operation is the intersection of graphs.
37      */

38     public static final int MERGE_INTERSECT = BaseBean.MERGE_INTERSECT;
39     /**
40      * Used in {@link #merge} method.<br>
41      * The result of merge operation is the union of graphs.
42      */

43     public static final int MERGE_UNION = BaseBean.MERGE_UNION;
44     /**
45      * Used in {@link #merge} method.<br>
46      * The result of merge operation is the first graph updated with the changes in another graph.
47      */

48     public static final int MERGE_UPDATE = BaseBean.MERGE_UPDATE;
49
50     /**
51      * Writes the deployment descriptor data from deployment descriptor bean graph to file object.<br>
52      * This is more convenient method than {@link org.netbeans.modules.j2ee.dd.api.common.CommonDDBean#write} method.<br>
53      * The locking problems are solved for the user in this method.
54      *
55      * @param fo File Object where to write the content of depl.descriptor holding in bean tree structure
56      */

57     public void write(org.openide.filesystems.FileObject fo) throws java.io.IOException JavaDoc ;
58
59     /**
60      * Merging two bean tree structures together.<pre>
61      *
62      *There are several ways odf merging :
63      *
64      * Let's define:
65      * G1 the current graph and G2 the new graph we want to merge
66      * E1 the set of element of G1 that don't exist anymore in G2.
67      * E2 the set of new elements of G2 that don't exist in G1.
68      *
69      * Then,
70      * MERGE_UPDATE is G1 - E1 + E2 (G1 becomes G2)
71      * MERGE_UNION is G1 U G2 <=> G1 + E2
72      * MERGE_INTERSECT is G1 n G2 <=> (G1 U G2) - E1 - E2
73      *</pre>
74      * @param bean root of the bean graph that is merged with actual bean graph
75      * @param mode type of merging (INTERSECT, UNION, UPDATE)
76      */

77     public void merge(RootInterface root, int mode);
78 }
79
Popular Tags