What this is
This file is included in the DevDaily.com
"Java Source Code
Warehouse" project. The intent of this project is to help you "Learn
Java by Example" TM.
Other links
The source code
/*
* Sun Public License Notice
*
* The contents of this file are subject to the Sun Public License
* Version 1.0 (the "License"). You may not use this file except in
* compliance with the License. A copy of the License is available at
* http://www.sun.com/
*
* The Original Code is NetBeans. The Initial Developer of the Original
* Code is Sun Microsystems, Inc. Portions Copyright 1997-2003 Sun
* Microsystems, Inc. All Rights Reserved.
*/
package org.netbeans.api.web.dd.common;
import org.netbeans.modules.schema2beans.BaseBean;
/**
* Interface representing the root of interfaces bean tree structure.
*
*Important note: Do not provide an implementation of this interface unless you are a DD API provider!
*
*
* @author Milan Kuchtiak
*/
public interface RootInterface extends ComponentInterface {
/**
* Used in {@link #merge} method.
* The result of merge operation is the intersection of graphs.
*/
public static final int MERGE_INTERSECT = BaseBean.MERGE_INTERSECT;
/**
* Used in {@link #merge} method.
* The result of merge operation is the union of graphs.
*/
public static final int MERGE_UNION = BaseBean.MERGE_UNION;
/**
* Used in {@link #merge} method.
* The result of merge operation is the first graph updated with the changes in another graph.
*/
public static final int MERGE_UPDATE = BaseBean.MERGE_UPDATE;
/**
* Writes the deployment descriptor data from deployment descriptor bean graph to file object.
* This is more convenient method than {@link org.netbeans.api.web.dd.common.CommonDDBean#write} method.
* The locking problems are solved for the user in this method.
*
* @param fo File Object where to write the content of depl.descriptor holding in bean tree structure
*/
public void write(org.openide.filesystems.FileObject fo) throws java.io.IOException ;
/**
* Merging two bean tree structures together. *
*There are several ways odf merging :
*
* Let's define:
* G1 the current graph and G2 the new graph we want to merge
* E1 the set of element of G1 that don't exist anymore in G2.
* E2 the set of new elements of G2 that don't exist in G1.
*
* Then,
* MERGE_UPDATE is G1 - E1 + E2 (G1 becomes G2)
* MERGE_UNION is G1 U G2 <=> G1 + E2
* MERGE_INTERSECT is G1 n G2 <=> (G1 U G2) - E1 - E2
*
* @param bean root of the bean graph that is merged with actual bean graph
* @param mode type of merging (INTERSECT, UNION, UPDATE)
*/
public void merge(RootInterface root, int mode);
}
|