NeXML: a UML-driven XML Schema with Java bindings for the NeXus format
Served: Thu Nov 20 17:10:29 PST 2008
NeXus Home ||  NeXML home |  MetaDTD(XML)->XMLschema(XSD) |  XSD->EMF(Java) |  XSD->UML ||  MetaDTD->NeXusBeans(Java) |  NeXusBeans->UML |  MetaDTD->HTML ||  Thanks
2008-10-30: This work on direct translation of the pre-NIAC2008 NeXus MetaDTD XML templates into Java is now considered obsolete, in favour of EObject bindings to the NeXML Schema generated with the Eclipse XSD API from the NeXus XML templates.

[ARCHIVAL] NeXusBeans: Java components generated from NeXus MetaDTD XML files

2007-04-08: The NeXusBeans beta release is available for download,
including the new metamodel-driven NeXusXmlTemplateToNeXusBean generator tool !
2007-02-25: The NeXusBeans alpha release is available for download

Q: What is a NeXusBean ?
A: It is a Java class that meets the property getter/setter and constructor requirements for JavaBeans. It is generated directly from the NeXus Meta-DTD XML files (templates) and serves as a Java domain entity for modelling neutron beam instruments and for reduction and analysis of neutron scattering data. Java NeXusBeans also represent a bridge to UML graphical engineering of neutron science components and graphical XML Schema engineering for NeXus.

Snapshot of an NXdata NeXusBean in the Netbeans IDE for Java.

Q: So I can build a neutron beam instrument using NeXusBean components in any old Java IDE ?
A: Yes ! In any old Java IDE. As Java beans. (Why, how else would you do it ? In Notepad ? Or by typing lots of strings in FORTRAN ?)

(Select image to enlarge in new window)
UML package diagram overview of the NeXusBean system (out-of-date)

Q: Can I serialize a NeXusBean structure to NeXus-compliant XML ?
A: Yes, the Bragg Institute is developing a NeXusBeanConverter for the XStream system to do just that. It will be made available here with the entire NeXusBean suite.

(Select image to enlarge in new window)
Overview of prototype NeXusBean serialization system (out-of-date)

Q: So I can write and read and entire NeXus structure one-shot without any tedious typing of those attributes ?
A: Yes. Why, have you been tediously copying and pasting attribute names from the Meta-DTDs into reader/writer pairs as strings ? The NeXusBean is your very good new friend !

Q: Will the Java software that is used here for generating the NeXusBean components from the Meta-DTDs be made available for download ?
A: Yes, however only once it has been applied successfully to deliver a NeXus-centric ModelServer and data reduction system for neutron beam instruments of the OPAL research reactor, for the Bragg Institute of the Australian Nuclear Science and Technology Organisation (ANSTO).

Q: Do I need to link to Darren Kelly's Open Source All+El Java architecture to use the NeXusBean components ?
A: No, NeXusBeans no longer inherit from the Bragg EntityBean interface. NeXusBean components are now completely standalone beans. (They can be integrated into the Darren Kelly's Bragg framework by wrapping.)

Q: Do I need to link to Darren Kelly's All+El Java architecture to do all the fancy instrument control facading, bean encapsulation, property change and veto notification, change logging, neutron beam instrument modelling, and NeXus reduction you guys at the Bragg Institute are doing for commissioning of the NBIs of OPAL ?
A: Yes. The All+El port-based system employed to introspectively encapsulate entity bean hierarchies (like NeXusBean components) and for redirected control (via the SICS control system, for example) will be released soon as Open Source, completely documented in UML2.0 and extensive Javadoc, and will be actively employed for a number of projects (at OPAL and elsewhere), including the Bragg ModelServer: a distributed, object-oriented, component-based, control system facade.

Q: Where can I find a good tutorial on JavaBeans ?
A: Visit The Sun JavaBeans tutorial.

NeXus Home ||  NeXML home |  MetaDTD(XML)->XMLschema(XSD) |  XSD->EMF(Java) |  XSD->UML ||  MetaDTD->NeXusBeans(Java) |  NeXusBeans->UML |  MetaDTD->HTML ||  Thanks
This dynamic web site and software © 2008 Darren R C Kelly. All rights reserved.
Content streamed from the NeXus home site is available under the GNU Free Documentation License 1.2.
Developer: Darren Kelly.    Project site hosted by: webel.com.au