<!-- <questionid="arch-overall"when="init"> Describetheoverallarchitecture. <hint> WhatwillbeAPIfor <ahref="http://openide.netbeans.org/tutorial/api-design.html#design.apiandspi"> clientsandwhatsupportAPI</a>? Whatpartswillbepluggable? Howwillplug-insberegistered?Pleaseuse<code><apitype="export"/></code> todescribeyourgeneralAPIs. Ifpossiblepleaseprovide simplediagrams. </hint> </question>
-->
<answer id="arch-overall">
<p>
XAM (Extensible Abstract Model) was developed as part of an effort to create
tools friendly schema model. This module was the extraction of useful patterns
for undo/redo, simple write transactions (in this sense a transaction supports
Isloation and Durability (to the extent possible) by allowing a single writer and
deferring dispatching of events to the end of the transaction, lazy initialization,
, inter/intra model references, and model creation.
<api name="org.netbeans.modules.xml.xam" group="java"type="export" category="devel">
Represents a domain independent model and associated artifacts such as
a factory, source, and the concept of a reference.
</api>
<api name="org.netbeans.modules.xml.xam.dom" group="java"type="export" category="devel">
Provides entities for working on XML based models. This package
depends on org.w3c packages and assumes a mapping between an xml tree and a
strongly typed binding. This package also provides the ability to resolve other
models
</api>
A client will normally subclass the appropriate abstract model and component
and thus have a starting point for a domain model (examples are the wsdl and
schema models).
</p>
</answer>
<!-- <questionid="arch-quality"when="init"> Howwillthe<ahref="http://www.netbeans.org/community/guidelines/q-evangelism.html">quality</a> ofyourcodebetestedand howarefutureregressionsgoingtobeprevented? <hint> Whatkindoftestingdo youwanttouse?Howmuchfunctionality,inwhichareas, shouldbecoveredbythetests? </hint> </question>
-->
<answer id="arch-quality">
<p>
Unit tests are provided as part of this module. FindBugs has also been run
on the source base.
</p>
</answer>
<!-- <questionid="arch-time"when="init"> Whatarethetimeestimatesofthework? <hint> Pleaseexpressyourestimatesofhowlongthedesign,implementation, stabilizationarelikelytolast.Howmanypeoplewillbeneededto implementthisandwhatistheexpectedmilestonebywhichtheworkshouldbe ready? </hint> </question>
-->
<answer id="arch-time">
<p>
The initial implementation has been completed.
</p>
</answer>
<!-- <questionid="arch-usecases"when="init"> <hint> Contentofthisanswerwillbedisplayedaspartofpageat http://www.netbeans.org/download/dev/javadoc/usecases.html Youcanusetags<usecasename="name>regularhtmldescription</usecase> andifyouwanttouseanURLyoucanprefixifwith@TOP@tobegin attherootofyourjavadoc </hint> Describethemain<ahref="http://openide.netbeans.org/tutorial/api-design.html#usecase"> usecases</a>ofthenewAPI.Whowilluseitunder whatcircumstances?Whatkindofcodewouldtypicallyneedtobewritten tousethemodule? </question>
-->
<answer id="arch-usecases">
<usecase id="uc1" name="domain model developer">
A domain model developer would determine the appropriate extension
package. A model outside of XML would extend org.netbeans.modules.xml.xam.AbstractModel,
and have the components in the domain extend org.netbeans.modules.xml.xam.AbstractComponent.
The org.netbeans.modules.xml.xam.AbstractFactory can also be used for creation
of models. The factory provides the creational, the model provides the entry point
into the domain model as well as a concrete reference point to register for
events. The component serves as the root of the domain level objects. This
provides some consistency across models as the original intention was to be
able to provide a unified model across different XML vocabularies.
An XML model developer would likely want to start using the XDM model
which provides the full fidelty XML document model. This is in the xml/xdm
module (described seperately). The XML module developer would also incorporate
the facilities for reading and writing to a catalog. This is incorporated
into methods available to subclasses in the xam.dom and xdm.xam models. The
project based catalog facility provides the ability to support versioned
catalog files which allow local access but URL based location attributes.
</usecase>
</answer>
<!-- <questionid="arch-what"when="init"> Whatisthisprojectgoodfor? <hint> Pleaseprovidehereafewlinesdescribingtheproject, whatproblemitshouldsolve,providelinkstodocumentation, specifications,etc. </hint> </question>
-->
<answer id="arch-what">
The xam module (XAM Module) provides a framework for domain model developers
to use when creating new models. This framework was started to encapsulate
common practices used when creating XML based models for XML schema and WSDL.
<p>List of the main features:</p>
<ul>
<li>Definition and partial implementation of both a generic and XML
specific model. The model supports eventing, Undo/Redo, sync, and
simple transactions. XML based models extend generic models and add support
for resolution.</li>
</ul>
</answer>
<!-- <questionid="compat-version"when="impl"> Canyourmodulecoexistwithearlierandfuture versionsofitself?Canyoucorrectlyreadalloldsettings?Willfuture versionsbeabletoreadyourcurrentsettings?Canyouread orpolitelyignoresettingsstoredbyafutureversion? <hint> Veryhelpfulforreadingsettingsistostoreversionnumber there,sofutureversionscandecidewhetherhowtoread/convert thesettingsandolderversionscanignorethenewones. </hint> </question>
-->
<answer id="compat-version">
<p>
yes. There are no settings used by this module.
</p>
</answer>
<!-- <questionid="deploy-dependencies"when="final"> Whatdoothermodulesneedtodotodeclareadependencyonthisone? <hint> Provideasampleoftheactuallinesyouwouldaddtoamodulemanifest todeclareadependency,forexampleusingOpenIDE-Module-Module-Dependencies orOpenIDE-Module-Requires.Youmayusethemagictoken@SPECIFICATION-VERSION@ torepresentthecurrentspecificationversionofthemodule. </hint> </question>
-->
<answer id="deploy-dependencies">
<p>
This module was developed from the bottom up (the api is not yet stable) and
thus a friend declaration is required before the module can be used.
</p>
</answer>
<!-- <questionid="exec-introspection"when="impl"> Doesyourmoduleuseanykindofruntimetypeinformation(<code>instanceof</code>, workwith<code>java.lang.Class</code>,etc.)? <hint> CheckforcaseswhenyouhaveanobjectoftypeAandyoualso expectitto(possibly)beoftypeBanddosomespecialaction.That shouldbedocumented.Thesameappliesonoperationsinmeta-level (Class.isInstance(...),Class.isAssignableFrom(...),etc.). </hint> </question>
-->
<answer id="exec-introspection">
<p>
There are several uses of dynamic runtime information. These uses will be
communicated in the JavaDoc.
</p>
</answer>
<!-- <questionid="exec-threading"when="impl"> Whatthreadingmodels,ifany,doesyourmoduleadhereto? <hint> IfyourmodulecallsforeignAPIswhichhaveaspecificthreadingmodel, indicatehowyoucomplywiththerequirementsformultithreadedaccess (synchronization,mutexes,etc.)applicabletothoseAPIs. IfyourmoduledefinesanyAPIs,orhascomplexinternalstructures thatmightbeusedfrommultiplethreads,declarehowyouprotect dataagainstconcurrentaccess,raceconditions,deadlocks,etc., andwhethersuchrulesareenforcedbyruntimewarnings,errors,assertions,etc. Examples:aclassmightbenon-thread-safe(likeJavaCollections);might befullythread-safe(internallocking);mightrequireaccessthroughamutex (andmayormaynotautomaticallyacquirethatmutexonbehalfofaclientmethod); mightbeabletorunonlyintheeventqueue;etc. Alsodescribewhenanyeventsarefired:synchronously,asynchronously,etc. Ideas:<ahref="http://core.netbeans.org/proposals/threading/index.html#recommendations">ThreadingRecommendations</a>(inprogress) </hint> </question>
-->
<answer id="exec-threading">
<p>
XAM supports only a single writer but multiple readers, thus supporting the
dirty read behavior. The implementation uses a java.util.concurrency semaphore
to ensure a single transaction. Incorrect transaction usage (either
attempting to mutate outside a transaction or starting a second transaction within an existing transaction generates a runtime error).
When a transaction is completed, events are fired synchronously.
XAM also provides a facility for periodic updating the model based
on changes to the underlying document. The initial parsing is done
on the RequestProcessor thread; however, mutation and event firing
is done from the AWT thread.
</p>
</answer>
<!-- <questionid="perf-mem"when="final"> Howmuchmemorydoesyourcomponentconsume?Estimate witharelationtothenumberofwindows,etc. </question>
-->
<answer id="perf-mem">
<p>
The default model is about 5000 bytes and a component is about 20 bytes. The XML model is roughly the same size and a XML component is 21 bytes. This
is the base size and the number of containing components can change the
size dramatically.
</p>
</answer>
<!-- <questionid="perf-scale"when="init"> Whichexternalcriteriainfluencetheperformanceofyour program(sizeoffileineditor,numberoffilesinmenu, insourcedirectory,etc.)andhowwellyourcodescales? <hint> Pleaseincludesomeestimates,thereareothermoredetailed questionstoanswerinlaterphasesofimplementation. </hint> </question>
-->
<answer id="perf-scale">
<p>
The number of components in the domain model. There is a limited
fixed cost per component and some models have 100,000 + components. In general,
the number of components is correlated with the size of the model
source.
</p>
</answer>
<!-- <questionid="perf-spi"when="init"> Howtheperformanceofthepluggedincodewillbeenforced? <hint> Ifyouallowforeigncodetobepluggedintoyourownmodule,how doyouenforcethatitwillbehavecorrectlyandquicklyandwillnot negativelyinfluencetheperformanceofyourownmodule? </hint> </question>
-->
<answer id="perf-spi">
<p>
This the super class so the performance is tied with the domain
model.
</p>
</answer>
<!-- <questionid="resources-file"when="final"> Doesyourmoduleuse<code>java.io.File</code>directly? <hint> NetBeansprovidealogicalwrapperoverplainfilescalled <code>org.openide.filesystems.FileObject</code>that providesuniformaccesstosuchresourcesandisthepreferred waythatshouldbeused.Butofcoursetherecanbesituationswhen thisisnotsuitable. </hint> </question>
-->
<answer id="resources-file">
<p>
XAM mutation is done to a javax.swing.Document, no direct file
access is used.
</p>
</answer>
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.