Adl Parser

Einbindung der Sourcen des "Java Implementation Projects" in Eclipse

1. Include Jar-Files des Java Implementation Project als User Library. (http://svn.openehr.org/ref_impl_java/TRUNK/docs/download.htm)

• openehr-rm-core: .jar
• openehr-rm-domain: .jar
• openehr-aom: .jar
• openehr-ap: .jar
• adl-parser: .jar

2. Die Klasse "SimpleMeasurementService" zum package "org.openehr.rm.support.measurement" hinzufügen. (http://www.openehr.org/wsvn/ref_impl_java/TRUNK/measure-serv/src/main/java/org/openehr/rm/support/measurement/SimpleMeasurementService.java?op=file&rev=195&sc=1)

3. Jar-File "commons-lang-2.3.jar" zum Project hinzufügen. (http://commons.apache.org/downloads/index.html)

4. Verwendung des ADL-Parsers: (http://openehr.cambiosys.org/continuum/servlet/browse?file=16/readme.txt)

a) One-time use
• Initialize the parser instance:
File adlFile = new File("my_archetype.adl");
ADLParser parser = new ADLParser(adlFile);
or
String adlText = …; // probably loaded from database
ADLParser parser = new ADLParser(adlText);
• Then call parser.parse() to get the Archetype instance

b) Multiple use
You can also keep the same parser instance after the first use and ask it to parse more archetypes.
• Same as above to get the parser instance _and_ parse the first archetype
• From the _second_ archetype, you need to call the following method:
parser.reInit(File adlFile);
or
parser.reInit(String adlText);
• Then call parser.parse() to get the Archetype instance.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License