~ubuntu-branches/ubuntu/quantal/netbeans/quantal

« back to all changes in this revision

Viewing changes to xml/xdm/arch.xml

  • Committer: Bazaar Package Importer
  • Author(s): Marek Slama
  • Date: 2008-01-29 14:11:22 UTC
  • Revision ID: james.westby@ubuntu.com-20080129141122-fnzjbo11ntghxfu7
Tags: upstream-6.0.1
ImportĀ upstreamĀ versionĀ 6.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="UTF-8"?><!-- -*- sgml-indent-step: 1 -*- -->
 
2
<!--
 
3
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 
4
 
 
5
Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
 
6
 
 
7
 
 
8
The contents of this file are subject to the terms of either the GNU
 
9
General Public License Version 2 only ("GPL") or the Common
 
10
Development and Distribution License("CDDL") (collectively, the
 
11
"License"). You may not use this file except in compliance with the
 
12
License. You can obtain a copy of the License at
 
13
http://www.netbeans.org/cddl-gplv2.html
 
14
or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
 
15
specific language governing permissions and limitations under the
 
16
License.  When distributing the software, include this License Header
 
17
Notice in each file and include the License file at
 
18
nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
 
19
particular file as subject to the "Classpath" exception as provided
 
20
by Sun in the GPL Version 2 section of the License file that
 
21
accompanied this code. If applicable, add the following below the
 
22
License Header, with the fields enclosed by brackets [] replaced by
 
23
your own identifying information:
 
24
"Portions Copyrighted [year] [name of copyright owner]"
 
25
 
 
26
Contributor(s):
 
27
 
 
28
 The Original Software is NetBeans. The Initial Developer of the Original
 
29
Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
 
30
 Microsystems, Inc. All Rights Reserved.
 
31
 
 
32
If you wish your version of this file to be governed by only the CDDL
 
33
or only the GPL Version 2, indicate your decision by adding
 
34
"[Contributor] elects to include this software in this distribution
 
35
under the [CDDL or GPL Version 2] license." If you do not indicate a
 
36
single choice of license, a recipient has the option to distribute
 
37
your version of this file under either the CDDL, the GPL Version 2 or
 
38
to extend the choice of license to its licensees as provided above.
 
39
However, if you add GPL Version 2 code and therefore, elected the GPL
 
40
Version 2 license, then the option applies only if the new code is
 
41
made subject to such option by the copyright holder.
 
42
-->
 
43
<!DOCTYPE api-answers PUBLIC "-//NetBeans//DTD Arch Answers//EN" "../../nbbuild/antsrc/org/netbeans/nbbuild/Arch.dtd" [
 
44
  <!ENTITY api-questions SYSTEM "../../nbbuild/antsrc/org/netbeans/nbbuild/Arch-api-questions.xml">
 
45
]>
 
46
 
 
47
<api-answers
 
48
  question-version="1.26"
 
49
  author="cwebster@netbeans.org"
 
50
>
 
51
 
 
52
  &api-questions;
 
53
 
 
54
 
 
55
<!--
 
56
        <question id="arch-overall" when="init">
 
57
            Describe the overall architecture. 
 
58
            <hint>
 
59
            What will be API for 
 
60
            <a href="http://openide.netbeans.org/tutorial/api-design.html#design.apiandspi">
 
61
                clients and what support API</a>? 
 
62
            What parts will be pluggable?
 
63
            How will plug-ins be registered? Please use <code>&lt;api type="export"/&gt;</code>
 
64
            to describe your general APIs.
 
65
            If possible please provide 
 
66
            simple diagrams. 
 
67
            </hint>
 
68
        </question>
 
69
-->
 
70
 <answer id="arch-overall">
 
71
  <p>
 
72
   XDM (XML Document Model) provides a XAM based full fidelity XML model which
 
73
   implements the org.w3c.dom interfaces. The intention is not to provide an
 
74
   an alternate implementation of the dom interfaces but only to reuse part of 
 
75
   the api where it makes sense and more importantly provide a foundation on 
 
76
   which to provide a model basis for graphical multi way editors. 
 
77
  </p>
 
78
   This module was developed to support the following requirements:
 
79
   <ul>
 
80
       <li>Full document fidelity. This allows the original document to be 
 
81
       preserved and only changes the actual sections of the document which
 
82
       were mutated (i.e. the transformation is lossless).</li>
 
83
       <li>Support for undo/redo in a memory efficient way</li>
 
84
       <li>Support for diff to allow changes to be detected in
 
85
       the underlying source</li>
 
86
       <li>Visitor support</li>
 
87
   </ul>
 
88
   <api name="org.netbeans.modules.xml.xdm" category="friend" type="export" group="java">
 
89
       This package provides API's for obtaining an XDM document and mutating 
 
90
       the XDM tree.
 
91
   </api>
 
92
   <api name="org.netbeans.modules.xml.xdm.diff" category="friend" type="export" group="java">
 
93
       XML diff capabilities are exposed through this package. 
 
94
   </api>
 
95
   <api name="org.netbeans.modules.xml.xdm.nodes" category="friend" type="export" group="java">
 
96
       XDM based implementation of DOM interfaces. 
 
97
   </api>
 
98
   <api name="org.netbeans.modules.xml.xdm.xam" category="friend" type="export" group="java">
 
99
       XAM model and component abstractions based on XDM tree. This is the
 
100
       basis for XML language models (like WSDL, Schema, and BPEL).
 
101
   </api>
 
102
   <api name="org.netbeans.modules.xml.xdm.visitor" category="friend" type="export" group="java">
 
103
       Visitors for operations over the XDM such as generating XPath
 
104
       expressions, calculatin document position and finding elements by 
 
105
       position. 
 
106
   </api>
 
107
 </answer>
 
108
 
 
109
 
 
110
 
 
111
<!--
 
112
        <question id="arch-quality" when="init">
 
113
            How will the <a href="http://www.netbeans.org/community/guidelines/q-evangelism.html">quality</a>
 
114
            of your code be tested and 
 
115
            how are future regressions going to be prevented?
 
116
            <hint>
 
117
            What kind of testing do
 
118
            you want to use? How much functionality, in which areas,
 
119
            should be covered by the tests? 
 
120
            </hint>
 
121
        </question>
 
122
-->
 
123
 <answer id="arch-quality">
 
124
  <p>
 
125
   This module is covered by JUnit tests and findBugs has been incorporated into
 
126
   the development process. This module is the core of most of the domain
 
127
   models and is extensively covered. 
 
128
  </p>
 
129
 </answer>
 
130
 
 
131
 
 
132
 
 
133
<!--
 
134
        <question id="arch-time" when="init">
 
135
            What are the time estimates of the work?
 
136
            <hint>
 
137
            Please express your estimates of how long the design, implementation,
 
138
            stabilization are likely to last. How many people will be needed to
 
139
            implement this and what is the expected milestone by which the work should be 
 
140
            ready?
 
141
            </hint>
 
142
        </question>
 
143
-->
 
144
 <answer id="arch-time">
 
145
  <p>
 
146
   This module is implementation complete, but will require additional effort
 
147
   for ongoing maintenence in conjunction with the other modules.
 
148
  </p>
 
149
 </answer>
 
150
 
 
151
 
 
152
 
 
153
<!--
 
154
        <question id="arch-usecases" when="init">
 
155
            <hint>
 
156
                Content of this answer will be displayed as part of page at
 
157
                http://www.netbeans.org/download/dev/javadoc/usecases.html 
 
158
                You can use tags &lt;usecase name="name&gt; regular html description &lt;/usecase&gt;
 
159
                and if you want to use an URL you can prefix if with @TOP@ to begin
 
160
                at the root of your javadoc
 
161
            </hint>
 
162
        
 
163
            Describe the main <a href="http://openide.netbeans.org/tutorial/api-design.html#usecase">
 
164
            use cases</a> of the new API. Who will use it under
 
165
            what circumstances? What kind of code would typically need to be written
 
166
            to use the module?
 
167
        </question>
 
168
-->
 
169
 <answer id="arch-usecases">
 
170
  <p>
 
171
   The typical client of XDM would be a tool author supporting an XML language 
 
172
who wants to provide a custom client API. A concrete example of this is the XML 
 
173
Schema model. The XML Schema model starts by subclassing AbstractXDMModel and
 
174
providing the component updater, which is called in conjunction with sync
 
175
to mutate the model according to changes in the underlying source. 
 
176
 
 
177
<usecase id="uc1" name="WSDL model">
 
178
    The WSDL model is based on the XDM model and relies on the XDM capabilities
 
179
    to provide the infrastructure necessary for providing a XAM based model.
 
180
</usecase>
 
181
<usecase id="uc2" name="Schema model">
 
182
    The Schema model is based on the XDM model and relies on the XDM capabilities
 
183
    to provide the infrastructure necessary for providing a XAM based model.
 
184
</usecase>
 
185
<usecase id="uc3" name="BPEL model">
 
186
    The BPEL model is based on the XDM model and relies on the XDM capabilities
 
187
    to provide the infrastructure necessary for providing a XAM based model.
 
188
</usecase>
 
189
 
 
190
The XDM model can be used in standalone mode. 
 
191
<code>  <br/><br/>
 
192
        BaseDocument sd = ...;
 
193
        <br/>
 
194
        Lookup lookup = Lookups.singleton(sd);
 
195
        <br/>
 
196
        // create an editable ModelSource with base document
 
197
        <br/>
 
198
        // in the lookup (this is required)
 
199
        <br/>
 
200
        ModelSource ms = new ModelSource(lookup, true);
 
201
        <br/>
 
202
        // create an XDMModel
 
203
        <br/>
 
204
        XDMModel model = new XDMModel(ms);
 
205
        <br/>
 
206
        // sync the XDM model with the underlying source
 
207
        <br/>
 
208
        model.sync();
 
209
        <br/>
 
210
        // create customer element, same as dom
 
211
        <br/>
 
212
        Element customer = model.getDocument().createElement("customer");
 
213
        <br/>
 
214
        // add to the model as 0th child of employee element, not shown
 
215
        <br/>
 
216
        model.add(employee,customer,0);
 
217
        <br/>
 
218
</code>
 
219
  </p>
 
220
 </answer>
 
221
 
 
222
 
 
223
 
 
224
<!--
 
225
        <question id="arch-what" when="init">
 
226
            What is this project good for?
 
227
            <hint>
 
228
            Please provide here a few lines describing the project, 
 
229
            what problem it should solve, provide links to documentation, 
 
230
            specifications, etc.
 
231
            </hint>
 
232
        </question>
 
233
-->
 
234
 <answer id="arch-what">
 
235
   The XDM module provides a basis for tool ready XML language models that require full 
 
236
document fidelity, undo/redo, and the ability to sync with the underlying source.
 
237
<p>List of the main features:</p>
 
238
<ul>
 
239
  <li>Support for full document fidelity. The users text including spacing and 
 
240
  comments are preserved.</li>
 
241
  <li>Undo / Redo is supported using the concept of an immutable tree. XDM nodes 
 
242
  do not have parent pointers (only a pointer to the model). Thus a node can
 
243
  be in multiple trees, where each tree is a version. When a mutation to the tree
 
244
  occurs a clone is made of each node in the parent path from the root to the mutated
 
245
  node. All unchanged nodes are simply referenced and thus will live in multiple
 
246
  trees. Thus an undo / redo is simply a reference change. The cost of storing
 
247
  multiple tree is minimized as only the diffs are stored in each version of the
 
248
  tree.</li>
 
249
  <li>The visitor pattern is used in addition to the DOM interfaces which allows 
 
250
  easier tree walking</li>
 
251
  <li>An XML diff visitor supports XML difference. Element identity can be 
 
252
  supplied by the client.</li>
 
253
</ul>
 
254
 </answer>
 
255
 
 
256
 
 
257
 
 
258
<!--
 
259
        <question id="arch-where" when="init">
 
260
            Where one can find sources for your module?
 
261
            <hint>
 
262
                Please provide link to the CVS web client at
 
263
                http://www.netbeans.org/download/source_browse.html
 
264
                or just use tag defaultanswer generate='here'
 
265
            </hint>
 
266
        </question>
 
267
-->
 
268
 <answer id="arch-where">
 
269
  <defaultanswer generate='here' />
 
270
 </answer>
 
271
 
 
272
 
 
273
 
 
274
<!--
 
275
        <question id="compat-i18n" when="impl">
 
276
            Is your module correctly internationalized?
 
277
            <hint>
 
278
            Correct internationalization means that it obeys instructions 
 
279
            at <a href="http://www.netbeans.org/download/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/i18n-branding.html">
 
280
            NetBeans I18N pages</a>.
 
281
            </hint>
 
282
        </question>
 
283
-->
 
284
 <answer id="compat-i18n">
 
285
  <p>
 
286
   yes
 
287
  </p>
 
288
 </answer>
 
289
 
 
290
 
 
291
 
 
292
<!--
 
293
        <question id="compat-standards" when="init">
 
294
            Does the module implement or define any standards? Is the 
 
295
            implementation exact or does it deviate somehow?
 
296
        </question>
 
297
-->
 
298
 <answer id="compat-standards">
 
299
  <p>
 
300
   This module implements the DOM interfaces but is not intended to be a 
 
301
   replacement for DOM. This module has special semantics surrounding mutation
 
302
   and thus the full DOM interfaces are not supported. 
 
303
  </p>
 
304
 </answer>
 
305
 
 
306
 
 
307
 
 
308
<!--
 
309
        <question id="compat-version" when="impl">
 
310
            Can your module coexist with earlier and future
 
311
            versions of itself? Can you correctly read all old settings? Will future
 
312
            versions be able to read your current settings? Can you read
 
313
            or politely ignore settings stored by a future version?
 
314
            
 
315
            <hint>
 
316
            Very helpful for reading settings is to store version number
 
317
            there, so future versions can decide whether how to read/convert
 
318
            the settings and older versions can ignore the new ones.
 
319
            </hint>
 
320
        </question>
 
321
-->
 
322
 <answer id="compat-version">
 
323
  <p>
 
324
   no settings or user visible features. 
 
325
  </p>
 
326
 </answer>
 
327
 
 
328
 
 
329
 
 
330
<!--
 
331
        <question id="dep-jre" when="final">
 
332
            Which version of JRE do you need (1.2, 1.3, 1.4, etc.)?
 
333
            <hint>
 
334
            It is expected that if your module runs on 1.x that it will run 
 
335
            on 1.x+1 if no, state that please. Also describe here cases where
 
336
            you run different code on different versions of JRE and why.
 
337
            </hint>
 
338
        </question>
 
339
-->
 
340
 <answer id="dep-jre">
 
341
  <p>
 
342
   1.5
 
343
  </p>
 
344
 </answer>
 
345
 
 
346
 
 
347
 
 
348
<!--
 
349
        <question id="dep-jrejdk" when="final">
 
350
            Do you require the JDK or is the JRE enough?
 
351
        </question>
 
352
-->
 
353
 <answer id="dep-jrejdk">
 
354
  <p>
 
355
   jre is sufficient
 
356
  </p>
 
357
 </answer>
 
358
 
 
359
 
 
360
 
 
361
<!--
 
362
        <question id="dep-nb" when="init">
 
363
            What other NetBeans projects and modules does this one depend on?
 
364
            <hint>
 
365
            If you want, describe such projects as imported APIs using
 
366
            the <code>&lt;api name="identification" type="import or export" category="stable" url="where is the description" /&gt;</code>
 
367
            </hint>
 
368
        </question>
 
369
-->
 
370
 <answer id="dep-nb">
 
371
  <defaultanswer generate='here' />
 
372
 </answer>
 
373
 
 
374
 
 
375
 
 
376
<!--
 
377
        <question id="dep-non-nb" when="init">
 
378
            What other projects outside NetBeans does this one depend on?
 
379
            
 
380
            <hint>
 
381
            Some non-NetBeans projects are packaged as NetBeans modules
 
382
            (see <a href="http://libs.netbeans.org/">libraries</a>) and
 
383
            it is preferred to use this approach when more modules may
 
384
            depend on such third-party library.
 
385
            </hint>
 
386
        </question>
 
387
-->
 
388
 <answer id="dep-non-nb">
 
389
  <p>
 
390
   none
 
391
  </p>
 
392
 </answer>
 
393
 
 
394
 
 
395
 
 
396
<!--
 
397
        <question id="dep-platform" when="init">
 
398
            On which platforms does your module run? Does it run in the same
 
399
            way on each?
 
400
            <hint>
 
401
            If your module is using JNI or deals with special differences of
 
402
            OSes like filesystems, etc. please describe here what they are.
 
403
            </hint>
 
404
        </question>
 
405
-->
 
406
 <answer id="dep-platform">
 
407
  <p>
 
408
   100% java, no platform requirement. 
 
409
  </p>
 
410
 </answer>
 
411
 
 
412
 
 
413
 
 
414
<!--
 
415
        <question id="deploy-dependencies" when="final">
 
416
            What do other modules need to do to declare a dependency on this one?
 
417
            <hint>
 
418
                Provide a sample of the actual lines you would add to a module manifest
 
419
                to declare a dependency, for example using OpenIDE-Module-Module-Dependencies
 
420
                or OpenIDE-Module-Requires. You may use the magic token @SPECIFICATION-VERSION@
 
421
                to represent the current specification version of the module.
 
422
            </hint>
 
423
        </question>
 
424
-->
 
425
 <answer id="deploy-dependencies">
 
426
  <p>
 
427
   This module is only exposing friend api's, thus a friend entry must be added
 
428
   to this module before use. 
 
429
  </p>
 
430
 </answer>
 
431
 
 
432
 
 
433
 
 
434
<!--
 
435
        <question id="deploy-jar" when="impl">
 
436
            Do you deploy just module JAR file(s) or other files as well?
 
437
            <hint>
 
438
            Usually a module consist of one JAR file (perhaps with Class-Path
 
439
            extensions) and also a configuration file that enables it. If you
 
440
            have any other files, use
 
441
            &lt;api group="java.io.File" name="yourname" type="export" category="friend"&gt;...&lt;/api&gt;
 
442
            to define the location, name and stability of your files (of course
 
443
            changing "yourname" and "friend" to suit your needs).
 
444
            
 
445
            If it uses more than one JAR, describe where they are located, how
 
446
            they refer to each other. 
 
447
            If it consist of module JAR(s) and other files, please describe
 
448
            what is their purpose, why other files are necessary. Please 
 
449
            make sure that installation/uninstallation leaves the system 
 
450
            in state as it was before installation.
 
451
            </hint>
 
452
        </question>
 
453
-->
 
454
 <answer id="deploy-jar">
 
455
  <p>
 
456
   only module jar file
 
457
  </p>
 
458
 </answer>
 
459
 
 
460
 
 
461
 
 
462
<!--
 
463
        <question id="deploy-nbm" when="impl">
 
464
            Can you deploy an NBM via the Update Center?
 
465
            <hint>
 
466
            If not why?
 
467
            </hint>
 
468
        </question>
 
469
-->
 
470
 <answer id="deploy-nbm">
 
471
  <p>
 
472
   yes
 
473
  </p>
 
474
 </answer>
 
475
 
 
476
 
 
477
 
 
478
<!--
 
479
        <question id="deploy-packages" when="init">
 
480
            Are packages of your module made inaccessible by not declaring them
 
481
            public?
 
482
            
 
483
            <hint>
 
484
            NetBeans module system allows restriction of access rights to
 
485
            public classes of your module from other modules. This prevents
 
486
            unwanted dependencies of others on your code and should be used
 
487
            whenever possible (<a href="http://www.netbeans.org/download/javadoc/OpenAPIs/org/openide/doc-files/upgrade.html#3.4-public-packages">
 
488
            public packages
 
489
            </a>). If you do not restrict access to your classes you are
 
490
            making it too easy for other people to misuse your implementation
 
491
            details, that is why you should have good reason for not 
 
492
            restricting package access.
 
493
            </hint>
 
494
        </question>
 
495
-->
 
496
 <answer id="deploy-packages">
 
497
  <p>
 
498
   currently friends support is being used, thus all clients are known.
 
499
  </p>
 
500
 </answer>
 
501
 
 
502
 
 
503
 
 
504
<!--
 
505
        <question id="deploy-shared" when="final">
 
506
            Do you need to be installed in the shared location only, or in the user directory only,
 
507
            or can your module be installed anywhere?
 
508
            <hint>
 
509
            Installation location shall not matter, if it does explain why.
 
510
            Consider also whether <code>InstalledFileLocator</code> can help.
 
511
            </hint>
 
512
        </question>
 
513
-->
 
514
 <answer id="deploy-shared">
 
515
  <p>
 
516
   installed anywhere
 
517
  </p>
 
518
 </answer>
 
519
 
 
520
 
 
521
 
 
522
<!--
 
523
        <question id="exec-ant-tasks" when="impl">
 
524
            Do you define or register any ant tasks that other can use?
 
525
            
 
526
            <hint>
 
527
            If you provide an ant task that users can use, you need to be very
 
528
            careful about its syntax and behaviour, as it most likely forms an
 
529
                  API for end users and as there is a lot of end users, their reaction
 
530
            when such API gets broken can be pretty strong.
 
531
            </hint>
 
532
        </question>
 
533
-->
 
534
 <answer id="exec-ant-tasks">
 
535
  <p>
 
536
   no
 
537
  </p>
 
538
 </answer>
 
539
 
 
540
 
 
541
 
 
542
<!--
 
543
        <question id="exec-classloader" when="impl">
 
544
            Does your code create its own class loader(s)?
 
545
            <hint>
 
546
            A bit unusual. Please explain why and what for.
 
547
            </hint>
 
548
        </question>
 
549
-->
 
550
 <answer id="exec-classloader">
 
551
  <p>
 
552
   no
 
553
  </p>
 
554
 </answer>
 
555
 
 
556
 
 
557
 
 
558
<!--
 
559
        <question id="exec-component" when="impl">
 
560
            Is execution of your code influenced by any (string) property
 
561
            of any of your components?
 
562
            
 
563
            <hint>
 
564
            Often <code>JComponent.getClientProperty</code>, <code>Action.getValue</code>
 
565
            or <code>PropertyDescriptor.getValue</code>, etc. are used to influence
 
566
            a behavior of some code. This of course forms an interface that should
 
567
            be documented. Also if one depends on some interface that an object
 
568
            implements (<code>component instanceof Runnable</code>) that forms an
 
569
            API as well.
 
570
            </hint>
 
571
        </question>
 
572
-->
 
573
 <answer id="exec-component">
 
574
  <p>
 
575
   no
 
576
  </p>
 
577
 </answer>
 
578
 
 
579
 
 
580
 
 
581
<!--
 
582
        <question id="exec-introspection" when="impl">
 
583
            Does your module use any kind of runtime type information (<code>instanceof</code>,
 
584
            work with <code>java.lang.Class</code>, etc.)?
 
585
            <hint>
 
586
            Check for cases when you have an object of type A and you also
 
587
            expect it to (possibly) be of type B and do some special action. That
 
588
            should be documented. The same applies on operations in meta-level
 
589
            (Class.isInstance(...), Class.isAssignableFrom(...), etc.).
 
590
            </hint>
 
591
        </question>
 
592
-->
 
593
 <answer id="exec-introspection">
 
594
  <p>
 
595
   The casting is documented. This needs to be reviewed and cleaned up. We need
 
596
   to look at each instanceof, AssignableFrom, and cast to see if we can eliminate
 
597
   this using a) visitor b) JDK 1.5 return value override 
 
598
  </p>
 
599
 </answer>
 
600
 
 
601
 
 
602
 
 
603
<!--
 
604
        <question id="exec-privateaccess" when="final">
 
605
            Are you aware of any other parts of the system calling some of 
 
606
            your methods by reflection?
 
607
            <hint>
 
608
            If so, describe the "contract" as an API. Likely private or friend one, but
 
609
            still API and consider rewrite of it.
 
610
            </hint>
 
611
        </question>
 
612
-->
 
613
 <answer id="exec-privateaccess">
 
614
  <p>
 
615
   no
 
616
  </p>
 
617
 </answer>
 
618
 
 
619
 
 
620
 
 
621
<!--
 
622
        <question id="exec-process" when="impl">
 
623
            Do you execute an external process from your module? How do you ensure
 
624
            that the result is the same on different platforms? Do you parse output?
 
625
            Do you depend on result code?
 
626
            <hint>
 
627
            If you feed an input, parse the output please declare that as an API.
 
628
            </hint>
 
629
        </question>
 
630
-->
 
631
 <answer id="exec-process">
 
632
  <p>
 
633
   no
 
634
  </p>
 
635
 </answer>
 
636
 
 
637
 
 
638
 
 
639
<!--
 
640
        <question id="exec-property" when="impl">
 
641
            Is execution of your code influenced by any environment or
 
642
            Java system (<code>System.getProperty</code>) property?
 
643
            
 
644
            <hint>
 
645
            If there is a property that can change the behavior of your 
 
646
            code, somebody will likely use it. You should describe what it does 
 
647
            and the <a href="http://openide.netbeans.org/tutorial/api-design.html#life">stability category</a>
 
648
            of this API. You may use
 
649
            <pre>
 
650
                &lt;api type="export" group="property" name="id" category="private" url="http://..."&gt;
 
651
                    description of the property, where it is used, what it influence, etc.
 
652
                &lt;/api&gt;            
 
653
            </pre>
 
654
            </hint>
 
655
        </question>
 
656
-->
 
657
 <answer id="exec-property">
 
658
  <p>
 
659
   no
 
660
  </p>
 
661
 </answer>
 
662
 
 
663
 
 
664
 
 
665
<!--
 
666
        <question id="exec-reflection" when="impl">
 
667
            Does your code use Java Reflection to execute other code?
 
668
            <hint>
 
669
            This usually indicates a missing or insufficient API in the other
 
670
            part of the system. If the other side is not aware of your dependency
 
671
            this contract can be easily broken.
 
672
            </hint>
 
673
        </question>
 
674
-->
 
675
 <answer id="exec-reflection">
 
676
  <p>
 
677
   no
 
678
  </p>
 
679
 </answer>
 
680
 
 
681
 
 
682
 
 
683
<!--
 
684
        <question id="exec-threading" when="impl">
 
685
            What threading models, if any, does your module adhere to?
 
686
            <hint>
 
687
                If your module calls foreign APIs which have a specific threading model,
 
688
                indicate how you comply with the requirements for multithreaded access
 
689
                (synchronization, mutexes, etc.) applicable to those APIs.
 
690
                If your module defines any APIs, or has complex internal structures
 
691
                that might be used from multiple threads, declare how you protect
 
692
                data against concurrent access, race conditions, deadlocks, etc.,
 
693
                and whether such rules are enforced by runtime warnings, errors, assertions, etc.
 
694
                Examples: a class might be non-thread-safe (like Java Collections); might
 
695
                be fully thread-safe (internal locking); might require access through a mutex
 
696
                (and may or may not automatically acquire that mutex on behalf of a client method);
 
697
                might be able to run only in the event queue; etc.
 
698
                Also describe when any events are fired: synchronously, asynchronously, etc.
 
699
                Ideas: <a href="http://core.netbeans.org/proposals/threading/index.html#recommendations">Threading Recommendations</a> (in progress)
 
700
            </hint>
 
701
        </question>
 
702
-->
 
703
 <answer id="exec-threading">
 
704
  <p>
 
705
   This model has been synchronized for thread safety. Thread safety is supported
 
706
   by allowing only a single model mutation (using java synchronized keyword). The
 
707
   immutable nature of the model only requires synchronization when updating the
 
708
   tree thus synchronization of nodes which are not yet in the tree is not thread
 
709
   safe. 
 
710
  </p>
 
711
 </answer>
 
712
 
 
713
 
 
714
 
 
715
<!--
 
716
        <question id="format-clipboard" when="impl">
 
717
            Which data flavors (if any) does your code read from or insert to
 
718
            the clipboard (by access to clipboard on means calling methods on <code>java.awt.datatransfer.Transferable</code>?
 
719
            
 
720
            <hint>
 
721
            Often Node's deal with clipboard by usage of <code>Node.clipboardCopy, Node.clipboardCut and Node.pasteTypes</code>.
 
722
            Check your code for overriding these methods.
 
723
            </hint>
 
724
        </question>
 
725
-->
 
726
 <answer id="format-clipboard">
 
727
  <p>
 
728
   none
 
729
  </p>
 
730
 </answer>
 
731
 
 
732
 
 
733
 
 
734
<!--
 
735
        <question id="format-dnd" when="impl">
 
736
            Which protocols (if any) does your code understand during Drag &amp; Drop?
 
737
            <hint>
 
738
            Often Node's deal with clipboard by usage of <code>Node.drag, Node.getDropType</code>. 
 
739
            Check your code for overriding these methods. Btw. if they are not overridden, they
 
740
            by default delegate to <code>Node.clipboardCopy, Node.clipboardCut and Node.pasteTypes</code>.
 
741
            </hint>
 
742
        </question>
 
743
-->
 
744
 <answer id="format-dnd">
 
745
  <p>
 
746
   none
 
747
  </p>
 
748
 </answer>
 
749
 
 
750
 
 
751
 
 
752
<!--
 
753
        <question id="format-types" when="impl">
 
754
            Which protocols and file formats (if any) does your module read or write on disk,
 
755
            or transmit or receive over the network? Do you generate an ant build script?
 
756
            Can it be edited and modified? 
 
757
            
 
758
            <hint>
 
759
            <p>
 
760
            Files can be read and written by other programs, modules and users. If they influence
 
761
            your behaviour, make sure you either document the format or claim that it is a private
 
762
            api (using the &lt;api&gt; tag). 
 
763
            </p>
 
764
            
 
765
            <p>
 
766
            If you generate an ant build file, this is very likely going to be seen by end users and
 
767
            they will be attempted to edit it. You should be ready for that and provide here a link
 
768
            to documentation that you have for such purposes and also describe how you are going to
 
769
            understand such files during next release, when you (very likely) slightly change the 
 
770
            format.
 
771
            </p>
 
772
            </hint>
 
773
        </question>
 
774
-->
 
775
 <answer id="format-types">
 
776
  <p>
 
777
   This module is designed to read and write XML files through a swing document.
 
778
  </p>
 
779
 </answer>
 
780
 
 
781
 
 
782
 
 
783
<!--
 
784
        <question id="lookup-lookup" when="init">
 
785
            Does your module use <code>org.openide.util.Lookup</code>
 
786
            or any similar technology to find any components to communicate with? Which ones?
 
787
            
 
788
            <hint>
 
789
            Please describe the interfaces you are searching for, where 
 
790
            are defined, whether you are searching for just one or more of them,
 
791
            if the order is important, etc. Also classify the stability of such
 
792
            API contract. For that use &lt;api group=&amp;lookup&amp; /&gt; tag.
 
793
            </hint>
 
794
        </question>
 
795
-->
 
796
 <answer id="lookup-lookup">
 
797
  <p>
 
798
   no
 
799
  </p>
 
800
 </answer>
 
801
 
 
802
 
 
803
 
 
804
<!--
 
805
        <question id="lookup-register" when="final">
 
806
            Do you register anything into lookup for other code to find?
 
807
            <hint>
 
808
            Do you register using layer file or using <code>META-INF/services</code>?
 
809
            Who is supposed to find your component?
 
810
            </hint>
 
811
        </question>
 
812
-->
 
813
 <answer id="lookup-register">
 
814
  <p>
 
815
   no
 
816
  </p>
 
817
 </answer>
 
818
 
 
819
 
 
820
 
 
821
<!--
 
822
        <question id="lookup-remove" when="final">
 
823
            Do you remove entries of other modules from lookup?
 
824
            <hint>
 
825
            Why? Of course, that is possible, but it can be dangerous. Is the module
 
826
            your are masking resource from aware of what you are doing?
 
827
            </hint>
 
828
        </question>
 
829
-->
 
830
 <answer id="lookup-remove">
 
831
  <p>
 
832
   no
 
833
  </p>
 
834
 </answer>
 
835
 
 
836
 
 
837
 
 
838
<!--
 
839
        <question id="perf-exit" when="final">
 
840
            Does your module run any code on exit?
 
841
        </question>
 
842
-->
 
843
 <answer id="perf-exit">
 
844
  <p>
 
845
   no
 
846
  </p>
 
847
 </answer>
 
848
 
 
849
 
 
850
 
 
851
<!--
 
852
        <question id="perf-huge_dialogs" when="final">
 
853
            Does your module contain any dialogs or wizards with a large number of
 
854
            GUI controls such as combo boxes, lists, trees, or text areas?
 
855
        </question>
 
856
-->
 
857
 <answer id="perf-huge_dialogs">
 
858
  <p>
 
859
   no
 
860
  </p>
 
861
 </answer>
 
862
 
 
863
 
 
864
 
 
865
<!--
 
866
        <question id="perf-limit" when="init">
 
867
            Are there any hard-coded or practical limits in the number or size of
 
868
            elements your code can handle?
 
869
        </question>
 
870
-->
 
871
 <answer id="perf-limit">
 
872
  <p>
 
873
   no. This module is able to parse large schemas > 1MB. 
 
874
  </p>
 
875
 </answer>
 
876
 
 
877
 
 
878
 
 
879
<!--
 
880
        <question id="perf-mem" when="final">
 
881
            How much memory does your component consume? Estimate
 
882
            with a relation to the number of windows, etc.
 
883
        </question>
 
884
-->
 
885
 <answer id="perf-mem">
 
886
  <p>
 
887
   A basic populated model is about 8000 bytes, this depends on how many components
 
888
   and the size of the file. 
 
889
  </p>
 
890
 </answer>
 
891
 
 
892
 
 
893
 
 
894
<!--
 
895
        <question id="perf-menus" when="final">
 
896
            Does your module use dynamically updated context menus, or
 
897
            context-sensitive actions with complicated and slow enablement logic?
 
898
            <hint>
 
899
                If you do a lot of tricks when adding actions to regular or context menus, you can significantly
 
900
                slow down display of the menu, even when the user is not using your action. Pay attention to
 
901
                actions you add to the main menu bar, and to context menus of foreign nodes or components. If
 
902
                the action is conditionally enabled, or changes its display dynamically, you need to check the
 
903
                impact on performance. In some cases it may be more appropriate to make a simple action that is
 
904
                always enabled but does more detailed checks in a dialog if it is actually run.
 
905
            </hint>
 
906
        </question>
 
907
-->
 
908
 <answer id="perf-menus">
 
909
  <p>
 
910
   no
 
911
  </p>
 
912
 </answer>
 
913
 
 
914
 
 
915
 
 
916
<!--
 
917
        <question id="perf-progress" when="final">
 
918
            Does your module execute any long-running tasks?
 
919
            
 
920
            <hint>Long running tasks should never block 
 
921
            AWT thread as it badly hurts the UI
 
922
            <a href="http://performance.netbeans.org/responsiveness/issues.html">
 
923
            responsiveness</a>.
 
924
            Tasks like connecting over
 
925
            network, computing huge amount of data, compilation
 
926
            be done asynchronously (for example
 
927
            using <code>RequestProcessor</code>), definitively it should 
 
928
            not block AWT thread.
 
929
            </hint>
 
930
        </question>
 
931
-->
 
932
 <answer id="perf-progress">
 
933
  <p>
 
934
   This module is used by clients and thus does not react directly to user
 
935
   events. 
 
936
  </p>
 
937
 </answer>
 
938
 
 
939
 
 
940
 
 
941
<!--
 
942
        <question id="perf-scale" when="init">
 
943
            Which external criteria influence the performance of your
 
944
            program (size of file in editor, number of files in menu, 
 
945
            in source directory, etc.) and how well your code scales?
 
946
            <hint>
 
947
            Please include some estimates, there are other more detailed 
 
948
            questions to answer in later phases of implementation. 
 
949
            </hint>
 
950
        </question>
 
951
-->
 
952
 <answer id="perf-scale">
 
953
  <p>
 
954
   The size of the XML file both in terms of the number of bytes as well as
 
955
   the number of elements and attributes. 
 
956
  </p>
 
957
 </answer>
 
958
 
 
959
 
 
960
 
 
961
<!--
 
962
        <question id="perf-spi" when="init">
 
963
            How the performance of the plugged in code will be enforced?
 
964
            <hint>
 
965
            If you allow foreign code to be plugged into your own module, how
 
966
            do you enforce that it will behave correctly and quickly and will not
 
967
            negatively influence the performance of your own module?
 
968
            </hint>
 
969
        </question>
 
970
-->
 
971
 <answer id="perf-spi">
 
972
  <p>
 
973
   Client code providing element identity may impact the performance of sync. 
 
974
   However, invoking sync is done by the client as thus the impact will be 
 
975
   reflected in the client module. There is no direct user interaction in 
 
976
   this module. 
 
977
  </p>
 
978
 </answer>
 
979
 
 
980
 
 
981
 
 
982
<!--
 
983
        <question id="perf-startup" when="final">
 
984
            Does your module run any code on startup?
 
985
        </question>
 
986
-->
 
987
 <answer id="perf-startup">
 
988
  <p>
 
989
   no
 
990
  </p>
 
991
 </answer>
 
992
 
 
993
 
 
994
 
 
995
<!--
 
996
        <question id="perf-wakeup" when="final">
 
997
            Does any piece of your code wake up periodically and do something
 
998
            even when the system is otherwise idle (no user interaction)?
 
999
        </question>
 
1000
-->
 
1001
 <answer id="perf-wakeup">
 
1002
  <p>
 
1003
   no
 
1004
  </p>
 
1005
 </answer>
 
1006
 
 
1007
 
 
1008
 
 
1009
<!--
 
1010
        <question id="resources-file" when="final">
 
1011
            Does your module use <code>java.io.File</code> directly?
 
1012
            
 
1013
            <hint>
 
1014
            NetBeans provide a logical wrapper over plain files called 
 
1015
            <code>org.openide.filesystems.FileObject</code> that
 
1016
            provides uniform access to such resources and is the preferred
 
1017
            way that should be used. But of course there can be situations when
 
1018
            this is not suitable.
 
1019
            </hint>
 
1020
        </question>
 
1021
-->
 
1022
 <answer id="resources-file">
 
1023
  <p>
 
1024
   no
 
1025
  </p>
 
1026
 </answer>
 
1027
 
 
1028
 
 
1029
 
 
1030
<!--
 
1031
        <question id="resources-layer" when="final">
 
1032
            Does your module provide own layer? Does it create any files or
 
1033
            folders in it? What it is trying to communicate by that and with which 
 
1034
            components?
 
1035
            
 
1036
            <hint>
 
1037
            NetBeans allows automatic and declarative installation of resources 
 
1038
            by module layers. Module register files into appropriate places
 
1039
            and other components use that information to perform their task
 
1040
            (build menu, toolbar, window layout, list of templates, set of
 
1041
            options, etc.). 
 
1042
            </hint>
 
1043
        </question>
 
1044
-->
 
1045
 <answer id="resources-layer">
 
1046
  <p>
 
1047
   no
 
1048
  </p>
 
1049
 </answer>
 
1050
 
 
1051
 
 
1052
 
 
1053
<!--
 
1054
        <question id="resources-mask" when="final">
 
1055
            Does your module mask/hide/override any resources provided by other modules in
 
1056
            their layers?
 
1057
            
 
1058
            <hint>
 
1059
            If you mask a file provided by another module, you probably depend
 
1060
            on that and do not want the other module to (for example) change
 
1061
            the file's name. That module shall thus make that file available as an API
 
1062
            of some stability category.
 
1063
            </hint>
 
1064
        </question>
 
1065
-->
 
1066
 <answer id="resources-mask">
 
1067
  <p>
 
1068
no
 
1069
  </p>
 
1070
 </answer>
 
1071
 
 
1072
 
 
1073
 
 
1074
<!--
 
1075
        <question id="resources-read" when="final">
 
1076
            Does your module read any resources from layers? For what purpose?
 
1077
            
 
1078
            <hint>
 
1079
            As this is some kind of intermodule dependency, it is a kind of API.
 
1080
            Please describe it and classify according to 
 
1081
            <a href="http://openide.netbeans.org/tutorial/api-design.html#categories">
 
1082
            common stability categories</a>.
 
1083
            </hint>
 
1084
        </question>
 
1085
-->
 
1086
 <answer id="resources-read">
 
1087
  <p>
 
1088
no
 
1089
  </p>
 
1090
 </answer>
 
1091
 
 
1092
 
 
1093
 
 
1094
<!--
 
1095
        <question id="security-grant" when="final">
 
1096
            Does your code grant additional rights to some other code?
 
1097
            <hint>Avoid using a class loader that adds extra
 
1098
            permissions to loaded code unless really necessary.
 
1099
            Also note that your API implementation
 
1100
            can also expose unneeded permissions to enemy code by
 
1101
            calling AccessController.doPrivileged().</hint>
 
1102
        </question>
 
1103
-->
 
1104
 <answer id="security-grant">
 
1105
  <p>
 
1106
no
 
1107
  </p>
 
1108
 </answer>
 
1109
 
 
1110
 
 
1111
 
 
1112
<!--
 
1113
        <question id="security-policy" when="final">
 
1114
            Does your functionality require modifications to the standard policy file?
 
1115
            <hint>Your code might pass control to third-party code not
 
1116
            coming from trusted domains. This could be code downloaded over the
 
1117
            network or code coming from libraries that are not bundled
 
1118
            with NetBeans. Which permissions need to be granted to which domains?</hint>
 
1119
        </question>
 
1120
-->
 
1121
 <answer id="security-policy">
 
1122
  <p>
 
1123
no
 
1124
  </p>
 
1125
 </answer>
 
1126
 
 
1127
</api-answers>