<!-- <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>
The schema model provides a read and write schema model based on XDM and XAM.
</p>
<api name="schema.model" category="friend"type="export" group="java">
This package provides API's for obtaining a schema model using the
factory pattern as well as reading and writing the schema structure.
This package is made up mostly of interfaces, which are not expected
to be implemented by the client. The entry point is the schema
model factory. The components are based on the structure of XML schema
and the names should reflect element and attribute names from the
schema specification.
</api>
<api name="schema.model.visitor" category="friend"type="export" group="java">
Generic visitor pattern support (such as empty and deep visitors) as well
as visitors for schema refactoring.
</api>
</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>
Junit tests are provided and expected to cover the common functionality. The
implementation is based on XDM and XAM and thus the implementations of the
classes mostly perform parameterized manipulation of the underlying XDM model.
Thus the testing approach is to have extensive unit testing for
areas where custom code needs to be written (such as resolving references and sync)
and course grained (does schema x work appropriately) for the balance of the
features.
As part of the development process we also use findBugs for static analysis.
</p>
</answer>
<!-- <questionid="arch-time"when="init"> Whatarethetimeestimatesofthework? <hint> Pleaseexpressyourestimatesofhowlongthedesign,implementation, stabilizationarelikelytolast.Howmanypeoplewillbeneededto implementthisandwhatistheexpectedmilestonebywhichtheworkshouldbe ready? </hint> </question>
-->
<answer id="arch-time">
<p>
This module is implementation complete, but will require additional effort
for ongoing maintenence in conjunction with the other modules.
</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">
<p>
The typical client of the Schema model would be a tool author requiring read
or write access to XML Schema.
</p>
<usecase id="uc1" name="WSDL model">
The WSDL model uses the Schema model as part of the types extensibility element. The Schema model can thus be embedded in the WSDL model.
</usecase>
<usecase id="uc2" name="Schema editor">
The schema editor uses the schema model to support both textual and
graphical editing.
</usecase>
<usecase id="uc3" name="BPEL assignment editor">
The BPEL assignment editor provides the ability to assign documents to
variable using a copy statement. The copy statement mapping requires the
structure of the incoming and outgoing documents to be visible to support
visual transformation. The schema model is used to derive this information.
</usecase>
Here is a code sample for working with the Schema model:
<code><br/><br/>
FileObject schemaFileObj = ...; // get file object for Schema
<br/><br/>
ModelSource source =
<br/>
org.netbeans.modules.xml.xam.locator.api.Utilities.getModelSource(
<br/>
schemaFileObj, true);
<br/>
SchemaModel model = SchemaModelFactory.getDefault().getModel(source);
<br/>
// access global elements
<br/>
Collection<P> globalElements = model.getSchema().getGlobalElements();
<br/>
<br/>
// create new global element
<br/>
GlobalElement globalElement = model.getFactory().createGlobalElement();
<br/>
globalElement.setName("newGlobalElement");
<br/>
// manipulation before adding to model, name, etc.
<br/>
try {
<br/>
// model must be manipulated in transaction
<br/>
model.startTransaction();
<br/>
// add port type to model
<br/>
model.getSchema().addGlobalElement(globalElement);
<br/>
} finally {
<br/>
model.endTransaction();
<br/>
}
<br/>
</code>
</answer>
<!-- <questionid="arch-what"when="init"> Whatisthisprojectgoodfor? <hint> Pleaseprovidehereafewlinesdescribingtheproject, whatproblemitshouldsolve,providelinkstodocumentation, specifications,etc. </hint> </question>
-->
<answer id="arch-what">
<p>
The Schema model provides the ability to read and write documents
complying with the Schema 1.0 specification.
</p>
<ul>
<li>Full document fidelty</li>
<li>Support for undo/redo in a memory efficient way</li>
<li>Support for sync which allow changes to be detected in
the underlying source and mutating the model to be compatible</li>
<li>Visitor support</li>
<li>Incorporation of the XAM locator for catalog based resolution
of referenced schema artifacts</li>
<li>Use of reference instead of raw URI to support retrieving the
actual component referenced instead of a URI</li>
</ul>
</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>
The API's are currently exposed through the friend mechanism, thus another
module would need to be added to the friends list.
</p>
</answer>
<!-- <questionid="deploy-packages"when="init"> Arepackagesofyourmodulemadeinaccessiblebynotdeclaringthem public? <hint> NetBeansmodulesystemallowsrestrictionofaccessrightsto publicclassesofyourmodulefromothermodules.Thisprevents unwanteddependenciesofothersonyourcodeandshouldbeused wheneverpossible(<ahref="http://www.netbeans.org/download/javadoc/OpenAPIs/org/openide/doc-files/upgrade.html#3.4-public-packages"> publicpackages </a>).Ifyoudonotrestrictaccesstoyourclassesyouare makingittooeasyforotherpeopletomisuseyourimplementation details,thatiswhyyoushouldhavegoodreasonfornot restrictingpackageaccess. </hint> </question>
-->
<answer id="deploy-packages">
<p>
yes, only the packages which are intended for external use are marked public.
Additionally the friend mechanism is used.
</p>
</answer>
<!-- <questionid="exec-reflection"when="impl"> DoesyourcodeuseJavaReflectiontoexecuteothercode? <hint> ThisusuallyindicatesamissingorinsufficientAPIintheother partofthesystem.Iftheothersideisnotawareofyourdependency thiscontractcanbeeasilybroken. </hint> </question>
-->
<answer id="exec-reflection">
<p>
This code uses some reflection for uniform treatment of enumerations.
</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>
This model uses the threading model of XAM/XDM. No additional synchronization
has been added in the module.
</p>
</answer>
<!-- <questionid="perf-limit"when="init"> Arethereanyhard-codedorpracticallimitsinthenumberorsizeof elementsyourcodecanhandle? </question>
-->
<answer id="perf-limit">
<p>
There are no hard coded limits.
</p>
</answer>
<!-- <questionid="perf-mem"when="final"> Howmuchmemorydoesyourcomponentconsume?Estimate witharelationtothenumberofwindows,etc. </question>
-->
<answer id="perf-mem">
<p>
A empty populated model is about 8000 bytes, this depends on how many components
and the size of the file. Each additional component adds about 20 bytes.
</p>
</answer>
<!-- <questionid="perf-progress"when="final"> Doesyourmoduleexecuteanylong-runningtasks? <hint>Longrunningtasksshouldneverblock AWTthreadasitbadlyhurtstheUI <ahref="http://performance.netbeans.org/responsiveness/issues.html"> responsiveness</a>. Taskslikeconnectingover network,computinghugeamountofdata,compilation bedoneasynchronously(forexample using<code>RequestProcessor</code>),definitivelyitshould notblockAWTthread. </hint> </question>
-->
<answer id="perf-progress">
<p>
no, this model does not initial actions.
</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 size of the file and number of components in the file is the limiting
factor. The schema model can handle large schema documents on the order of a
megabyte of text. Performance testing has been performed on industry standard
schemas to ensure reasonable performance in practical situatitions.
</p>
</answer>
<!-- <questionid="perf-spi"when="init"> Howtheperformanceofthepluggedincodewillbeenforced? <hint> Ifyouallowforeigncodetobepluggedintoyourownmodule,how doyouenforcethatitwillbehavecorrectlyandquicklyandwillnot negativelyinfluencetheperformanceofyourownmodule? </hint> </question>
-->
<answer id="perf-spi">
<p>
no special provisions, there is no plug-in spi.
</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.0.65Bemerkung:
(vorverarbeitet am 2026-06-10)
¤
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.