001: /*
002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003: *
004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005: *
006: * The contents of this file are subject to the terms of either the GNU
007: * General Public License Version 2 only ("GPL") or the Common
008: * Development and Distribution License("CDDL") (collectively, the
009: * "License"). You may not use this file except in compliance with the
010: * License. You can obtain a copy of the License at
011: * http://www.netbeans.org/cddl-gplv2.html
012: * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
013: * specific language governing permissions and limitations under the
014: * License. When distributing the software, include this License Header
015: * Notice in each file and include the License file at
016: * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
017: * particular file as subject to the "Classpath" exception as provided
018: * by Sun in the GPL Version 2 section of the License file that
019: * accompanied this code. If applicable, add the following below the
020: * License Header, with the fields enclosed by brackets [] replaced by
021: * your own identifying information:
022: * "Portions Copyrighted [year] [name of copyright owner]"
023: *
024: * Contributor(s):
025: *
026: * The Original Software is NetBeans. The Initial Developer of the Original
027: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
028: * Microsystems, Inc. All Rights Reserved.
029: *
030: * If you wish your version of this file to be governed by only the CDDL
031: * or only the GPL Version 2, indicate your decision by adding
032: * "[Contributor] elects to include this software in this distribution
033: * under the [CDDL or GPL Version 2] license." If you do not indicate a
034: * single choice of license, a recipient has the option to distribute
035: * your version of this file under either the CDDL, the GPL Version 2 or
036: * to extend the choice of license to its licensees as provided above.
037: * However, if you add GPL Version 2 code and therefore, elected the GPL
038: * Version 2 license, then the option applies only if the new code is
039: * made subject to such option by the copyright holder.
040: */
041:
042: package org.netbeans.modules.uml.core.metamodel.diagrams;
043:
044: import org.netbeans.modules.uml.core.metamodel.core.foundation.IElement;
045: import org.netbeans.modules.uml.core.metamodel.core.foundation.INamespace;
046: import org.netbeans.modules.uml.core.metamodel.structure.IProject;
047: import org.netbeans.modules.uml.core.support.umlutils.ETList;
048:
049: public interface IProxyDiagram {
050: public DiagramDetails getDiagramDetails();
051:
052: /**
053: * Get/Set the name of this drawing.
054: */
055: public String getName();
056:
057: /**
058: * Get/Set the name of this drawing.
059: */
060: public void setName(String value);
061:
062: /**
063: * Get/Set the alias of this drawing.
064: */
065: public String getAlias();
066:
067: /**
068: * Get/Set the alias of this drawing.
069: */
070: public void setAlias(String value);
071:
072: /**
073: * Sets / Gets the name or alias of this element.
074: */
075: public String getNameWithAlias();
076:
077: /**
078: * Sets / Gets the name or alias of this element.
079: */
080: public void setNameWithAlias(String value);
081:
082: /**
083: * Retrieves the fully qualified name of the element. This will be in the form 'A::B::C'.
084: */
085: public String getQualifiedName();
086:
087: /**
088: * Get/Set the documentation for this drawing.
089: */
090: public String getDocumentation();
091:
092: /**
093: * Get/Set the documentation for this drawing.
094: */
095: public void setDocumentation(String value);
096:
097: /**
098: * Gets the drawing area namespace
099: */
100: public INamespace getNamespace();
101:
102: /**
103: * Gets the drawing area namespace
104: */
105: public void setNamespace(INamespace value);
106:
107: /**
108: * Gets the drawing area namespace XMIID
109: */
110: public String getNamespaceXMIID();
111:
112: /**
113: * Gets the diagram XMIID
114: */
115: public String getXMIID();
116:
117: /**
118: * Get/Set the filename that this proxy diagram is looking at
119: */
120: public String getFilename();
121:
122: /**
123: * Get/Set the filename that this proxy diagram is looking at
124: */
125: public void setFilename(String value);
126:
127: /**
128: * Get/Set the type of this drawing.
129: */
130: public int getDiagramKind();
131:
132: /**
133: * Get/Set the type of this drawing as a string.
134: */
135: public String getDiagramKindName();
136:
137: /**
138: * Gets the drawing area toplevel project
139: */
140: public IProject getProject();
141:
142: /**
143: * Returns the IDiagram that represents this proxy. If the diagram is close NULL is returned.
144: */
145: public IDiagram getDiagram();
146:
147: /**
148: * Is this diagram open?
149: */
150: public boolean isOpen();
151:
152: /**
153: * Returns true if bDiagramFilename represents a valid filename. It looks for both .etp and .etl files.
154: */
155: public boolean isValidDiagram();
156:
157: /**
158: * Are these proxy diagrams the same?
159: */
160: public boolean isSame(IProxyDiagram pProxy);
161:
162: /**
163: * Is this diagram readonly?
164: */
165: public boolean getReadOnly();
166:
167: /**
168: * Adds an associated diagram
169: */
170: public void addAssociatedDiagram(String sDiagramXMIID);
171:
172: /**
173: * Adds an associated diagram
174: */
175: public void addAssociatedDiagram(IProxyDiagram pDiagram);
176:
177: /**
178: * Adds an association between diagram 1 and 2 and 2 and 1
179: */
180: public void addDualAssociatedDiagrams(IProxyDiagram pDiagram1,
181: IProxyDiagram pDiagram2);
182:
183: /**
184: * Removes an associated diagram
185: */
186: public void removeAssociatedDiagram(String sDiagramXMIID);
187:
188: /**
189: * Removes an associated diagram
190: */
191: public void removeAssociatedDiagram(IProxyDiagram pDiagram);
192:
193: /**
194: * Removes an association between diagram 1 and 2 and 2 and 1
195: */
196: public void removeDualAssociatedDiagrams(IProxyDiagram pDiagram1,
197: IProxyDiagram pDiagram2);
198:
199: /**
200: * Returns the associated diagrams
201: */
202: public ETList<IProxyDiagram> getAssociatedDiagrams();
203:
204: /**
205: * Is this an associated diagram?
206: */
207: public boolean isAssociatedDiagram(String sDiagramXMIID);
208:
209: /**
210: * Is this an associated diagram?
211: */
212: public boolean isAssociatedDiagram(IProxyDiagram pDiagram);
213:
214: /**
215: * Adds an associated model element
216: */
217: public void addAssociatedElement(String sTopLevelElementXMIID,
218: String sModelElementXMIID);
219:
220: /**
221: * Adds an associated model element
222: */
223: public void addAssociatedElement(IElement pElement);
224:
225: /**
226: * Removes an associated model element
227: */
228: public void removeAssociatedElement(String sTopLevelElementXMIID,
229: String sModelElementXMIID);
230:
231: /**
232: * Removes an associated model element
233: */
234: public void removeAssociatedElement(IElement pElement);
235:
236: /**
237: * Returns the associated model elements
238: */
239: public ETList<IElement> getAssociatedElements();
240:
241: /**
242: * Is this an associated element?
243: */
244: public boolean isAssociatedElement(String sModelElementXMIID);
245:
246: /**
247: * Is this an associated element?
248: */
249: public boolean isAssociatedElement(IElement pElement);
250:
251: //needed for showing the element properly in navigation dialog
252: public String toString();
253: }
|