You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@daffodil.apache.org by Pirow Engelbrecht <pi...@etion.co.za> on 2019/10/07 11:40:14 UTC
Daffodil Compiler Java API
Hello,
We have a Daffodil schema that exist as a Java String. We would like to compile this schema, but there are only two methods that exist for the Daffodil compiler API: compileFile and compileSource. We would like to sidestep disk access as this slows things down. CompileSource uses a URI reference to retrieve the schema and is not quite what we need. Is there any other methods or workarounds available?
Thanks
Pirow Engelbrecht | Senior Design Engineer
Tel +27 12 678 9740 (ext. 9879) | Cell +27 63 148 3376
76 Regency Drive | Irene | Centurion | 0157<https://goo.gl/maps/v9ZbwjqpPyL2>
[create-transition]<https://etion.co.za/>
Facebook<https://www.facebook.com/Etion-Limited-2194612947433812?_rdc=1&_rdr> | YouTube<https://www.youtube.com/channel/UCUY-5oeACtLk2uTsEjZCU6A> | LinkedIn<https://www.linkedin.com/company/etionltd> | Twitter<https://twitter.com/Etionlimited> | Instagram<https://www.instagram.com/Etionlimited/>
Re: Daffodil Compiler Java API
Posted by Steve Lawrence <st...@gmail.com>.
Unfortunately, we currently only support schemas being loaded from
disk/jars. DAFFODIL-1073 is the issue to add the capability to load from
memory.
https://issues.apache.org/jira/browse/DAFFODIL-1073
If you're interested in Daffodil/Scala development, this would probably
be a good bug to get started. The Daffodil devs would be happy to
provide guidance to spin you up with the codebase and where to get
started with such a change.
- Steve
On 10/7/19 7:40 AM, Pirow Engelbrecht wrote:
> Hello,
>
> We have a Daffodil schema that exist as a Java String. We would like to compile
> this schema, but there are only two methods that exist for the Daffodil compiler
> API: compileFile and compileSource. We would like to sidestep disk access as
> this slows things down. CompileSource uses a URI reference to retrieve the
> schema and is not quite what we need. Is there any other methods or workarounds
> available?
>
> Thanks
>
> *Pirow Engelbrecht *| Senior Design Engineer
> *Tel* +27 12 678 9740 (ext. 9879) | *Cell* +27 63 148 3376
>
>
>
> 76 Regency Drive | Irene | Centurion | 0157 <https://goo.gl/maps/v9ZbwjqpPyL2>
>
> create-transition <https://etion.co.za/>
>
> Facebook <https://www.facebook.com/Etion-Limited-2194612947433812?_rdc=1&_rdr> |
> YouTube <https://www.youtube.com/channel/UCUY-5oeACtLk2uTsEjZCU6A> | LinkedIn
> <https://www.linkedin.com/company/etionltd> | Twitter
> <https://twitter.com/Etionlimited> | Instagram
> <https://www.instagram.com/Etionlimited/>
>
Re: Daffodil Compiler Java API
Posted by "Sloane, Brandon" <bs...@tresys.com>.
This is a rather platform specific solution, but could you use a ram disk to hold your schema file. On most Linux distributions, files written in /dev/shm are stored in RAM, and not written to disk. I believe Mac OS and Windows have similar functionality (possibly through 3rd party programs).
________________________________
From: Pirow Engelbrecht <pi...@etion.co.za>
Sent: Monday, October 7, 2019 7:40 AM
To: users@daffodil.apache.org <us...@daffodil.apache.org>
Subject: Daffodil Compiler Java API
Hello,
We have a Daffodil schema that exist as a Java String. We would like to compile this schema, but there are only two methods that exist for the Daffodil compiler API: compileFile and compileSource. We would like to sidestep disk access as this slows things down. CompileSource uses a URI reference to retrieve the schema and is not quite what we need. Is there any other methods or workarounds available?
Thanks
Pirow Engelbrecht | Senior Design Engineer
Tel +27 12 678 9740 (ext. 9879) | Cell +27 63 148 3376
76 Regency Drive | Irene | Centurion | 0157<https://goo.gl/maps/v9ZbwjqpPyL2>
[create-transition]<https://etion.co.za/>
Facebook<https://www.facebook.com/Etion-Limited-2194612947433812?_rdc=1&_rdr> | YouTube<https://www.youtube.com/channel/UCUY-5oeACtLk2uTsEjZCU6A> | LinkedIn<https://www.linkedin.com/company/etionltd> | Twitter<https://twitter.com/Etionlimited> | Instagram<https://www.instagram.com/Etionlimited/>