001: /*
002: * The contents of this file are subject to the terms of the Common Development
003: * and Distribution License (the License). You may not use this file except in
004: * compliance with the License.
005: *
006: * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
007: * or http://www.netbeans.org/cddl.txt.
008: *
009: * When distributing Covered Code, include this CDDL Header Notice in each file
010: * and include the License file at http://www.netbeans.org/cddl.txt.
011: * If applicable, add the following below the CDDL Header, with the fields
012: * enclosed by brackets [] replaced by your own identifying information:
013: * "Portions Copyrighted [year] [name of copyright owner]"
014: *
015: * The Original Software is NetBeans. The Initial Developer of the Original
016: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
017: * Microsystems, Inc. All Rights Reserved.
018: */
019:
020: package org.netbeans.modules.soa.mapper.common;
021:
022: /**
023: * <p>
024: *
025: * Title: IMapperGroupNode </p> <p>
026: *
027: * Description: By using this node group, model knows the connection of the
028: * mutiple links. Since mutiple links do not connect by nodes ( 1 node only can
029: * associated with 1 link), using this class to join links together, in
030: * specified order. </p> <p>
031: *
032: * Copyright: Copyright (c) 2002 </p> <p>
033: *
034: * Company: </p>
035: *
036: * @author Un Seng Leong
037: * @created December 4, 2002
038: * @version 1.0
039: */
040: public interface IMapperGroupNode extends IMapperNode {
041:
042: /**
043: * The property name of a new link added to this model.
044: */
045: public static final String NODE_INSERTED = "MapperGN.InsertNode";
046:
047: /**
048: * The property name of a link remove from this model.
049: */
050: public static final String NODE_REMOVED = "MapperGN.RemoveNode";
051:
052: /**
053: * Return the next node of the specified node.
054: *
055: * @param node the start node to search for.
056: * @return the next node of the specified start node
057: */
058: public IMapperNode getNextNode(IMapperNode node);
059:
060: /**
061: * Return the previous node of the specified node.
062: *
063: * @param prev the previous node to search for.
064: * @return the previous node of the specified start node
065: */
066: public IMapperNode getPreviousNode(IMapperNode prev);
067:
068: /**
069: * Return the last position node of this group node.
070: *
071: * @return the last position node of this group node.
072: */
073: public IMapperNode getLastNode();
074:
075: /**
076: * Return the first position node of this group node.
077: *
078: * @return the first position node of this group node.
079: */
080: public IMapperNode getFirstNode();
081:
082: /**
083: * Adds a node to be the first child of the IMapperGroupNode object
084: *
085: * @param node the first child of the IMapperGroupNode object
086: */
087: public void addToFirst(IMapperNode node);
088:
089: /**
090: * Adds a node to be the Last child of the IMapperGroupNode object
091: *
092: * @param node be the Last child of the IMapperGroupNode object
093: */
094: public void addToLast(IMapperNode node);
095:
096: /**
097: * Add a node to be the next one of the specified child node.
098: *
099: * @param childNode the childNode to be match
100: * @param newNode the new node to be added next to child
101: */
102: public void addNextNode(IMapperNode childNode, IMapperNode newNode);
103:
104: /**
105: * Add a node to be the previous one of the specified child node.
106: *
107: * @param childNode the childNode to be match
108: * @param newNode the new node to be added previous to child
109: */
110: public void addPrevNode(IMapperNode childNode, IMapperNode newNode);
111:
112: /**
113: * Return the start node that contains by the specifed link and also is one
114: * of the node in this group node.
115: *
116: * @param link the specified link
117: * @return the node in this group node that connected to the start
118: * point of the specified link.
119: */
120: public IMapperNode getLinkStartNode(IMapperLink link);
121:
122: /**
123: * Return the end node that contains by the specifed link and also is one of
124: * the node in this group node.
125: *
126: * @param link the specified link
127: * @return the node in this group node that connected end point to the
128: * of the specified link.
129: */
130: public IMapperNode getLinkEndNode(IMapperLink link);
131:
132: /**
133: * Find and return the mapper node that contains the specified node object.
134: *
135: * @param nodeObj the specifed node object to be matched.
136: * @return the mapper node that contains the specified node object.
137: */
138: public IMapperNode findNodeByNodeObject(Object nodeObj);
139:
140: /**
141: * Remove the sepecified from this group node.
142: *
143: * @param node the node to be removed.
144: */
145: public void removeNode(IMapperNode node);
146:
147: /**
148: * Return true if the specifed node is in this group node, false otherwise.
149: *
150: * @param node the specifed node to find.
151: * @return true if the specifed node is in this group node, false
152: * otherwise.
153: */
154: public boolean containsNode(IMapperNode node);
155:
156: /**
157: * Return the number of nodes in this group node.
158: *
159: * @return the number of nodes in this group node.
160: */
161: public int getNodeCount();
162:
163: }
|