# adl to java object

**URL:** https://discourse.openehr.org/t/adl-to-java-object/12627
**Category:** Reference Implementation: Java (archive)
**Created:** [16 June 2008 08:31 UTC](https://discourse.openehr.org/t/adl-to-java-object/12627 "2008-06-16T08:31:56Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Ime\_Asangansi](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/i/13edae/32.png) [@Ime\_Asangansi](https://discourse.openehr.org/u/Ime_Asangansi)
#### Post date: [16 June 2008 08:31 UTC](https://discourse.openehr.org/t/adl-to-java-object/12627/1 "2008-06-16T08:31:56Z")

</div>

Hi dev guys,

I just hope this is the right place to ask this.  
Today, I just successfully got the java openehr jars...

I am now looking looking forward to being able to parse adl into a java object.  
Please I need some documentation or sense of direction in trying to do this cos I need to work with the object.

Pls help

Thanks a lot

ime

---

<div class="post-metadata">

### Author: ![system](https://discourse.openehr.org/uploads/default/original/2X/f/f0a1dedb20c42747bddcafd6c7df9db5f34f003c.svg) [@system](https://discourse.openehr.org/u/system)
#### Post date: [16 June 2008 08:48 UTC](https://discourse.openehr.org/t/adl-to-java-object/12627/2 "2008-06-16T08:48:22Z")

</div>

Hi Ime,

is this what you are looking for?

BufferedReader in = new BufferedReader(  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;new InputStreamReader(  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;new FileInputStream("D:\\openEHR-EHR-CLUSTER.auscultation.v1.adl") , "UTF-8"  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;);  
ADLParser parser = new ADLParser(in);  
Archetype a = parser.parse();

System.out.println(a.getArchetypeId());  
System.out.println("Concept: "+a.getConcept());  
System.out.println("OntDefs Lang: " + a.getOntology().getLanguages());  
System.out.println("ConceptName (en):"+a.getConceptName("en"));  
// if exists... System.out.println("ConceptName (tr):"+a.getConceptName("tr"));  
//if exist... System.out.println("ConceptName (de):"+a.getConceptName("de"));  
System.out.println(a.getOntology().termDefinition("en", "at0000").getText());  
System.out.println(a.getOntology().termDefinition("en",  
"at0000").getDescription());

Cheers  
Sebastian

---

<div class="post-metadata">

### Author: ![Ime\_Asangansi](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/i/13edae/32.png) [@Ime\_Asangansi](https://discourse.openehr.org/u/Ime_Asangansi)
#### Post date: [16 June 2008 13:06 UTC](https://discourse.openehr.org/t/adl-to-java-object/12627/3 "2008-06-16T13:06:50Z")

</div>

Thanks, Sebastian.  
Yep. This is what I'm looking for.

And please whats the easiest way of getting the javadoc  
I need to look more closely at using the Archetype object...

BTW: I'm trying use the eclipse wizard to create a webclient that links to the archetypefinder ([http://www.archetypes.com.au/archetypefinder/services/ArchetypeFinderBean?wsdl](http://www.archetypes.com.au/archetypefinder/services/ArchetypeFinderBean?wsdl))

but I get validation errors that prevent this. I dont know if anyone here could help out.  
Please see below:

Line 5.  
AN array declaration uses - restricts or extends - the soapenc:Array type, or the wsdl:array attribute is used in the type declaration.  
A wsdl:types element contained a data type definition that is not an xml schema definition  
Line 208.  
The use attribute of a soapbind:body, soapbind:fault, soapbind:header fault doesnt have value of "literal"  
Line 132.  
name attributes are not unique within the portType definition

Ime

---

<div class="post-metadata">

### Author: ![system](https://discourse.openehr.org/uploads/default/original/2X/f/f0a1dedb20c42747bddcafd6c7df9db5f34f003c.svg) [@system](https://discourse.openehr.org/u/system)
#### Post date: [17 June 2008 07:42 UTC](https://discourse.openehr.org/t/adl-to-java-object/12627/4 "2008-06-17T07:42:00Z")

</div>

> Thanks, Sebastian.  
> Yep. This is what I’m looking for.
> 
> And please whats the easiest way of getting the javadoc  
> I need to look more closely at using the Archetype object…

Hi Ime,

CD to top directory of a project (e.g. openehr-rm-core), type “mvn javadoc:javadoc” and find the javadocs from **target/site/apidocs**

/Rong
