[Biojava-dev] Vedr.: biojava-dev Digest, Vol 70, Issue 2
TSN at atp.dk
TSN at atp.dk
Tue Jan 13 14:24:31 UTC 2009
Hello !
Regarding XML-Schemas - Have You ever tried to use XML-beans.
As a proffesional JAVA developer I have had some very good experiences in
converting between JAVA objects and complex XML structures
with XML-beans. You have to setup a system for generating the beans, but
afterwards the benefir is worth it
/Tom Stevns - DK
biojava-dev-request at lists.open-bio.org
Sendt af: biojava-dev-bounces at lists.open-bio.org
13-01-2009 15:03
Besvar venligst til
biojava-dev at lists.open-bio.org
Til
biojava-dev at lists.open-bio.org
cc
Emne
biojava-dev Digest, Vol 70, Issue 2
Send biojava-dev mailing list submissions to
biojava-dev at lists.open-bio.org
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.open-bio.org/mailman/listinfo/biojava-dev
or, via email, send a message with subject or body 'help' to
biojava-dev-request at lists.open-bio.org
You can reach the person managing the list at
biojava-dev-owner at lists.open-bio.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of biojava-dev digest..."
Today's Topics:
1. Re: XML Schema (Mark Schreiber)
2. Re: XML Schema (Ola Spjuth)
3. Re: XML Schema (Mark Schreiber)
4. Re: XML Schema (Mark Schreiber)
5. Re: XML Schema (Ola Spjuth)
6. Re: XML Schema (Richard Holland)
7. Re: XML Schema (markjschreiber at gmail.com)
----------------------------------------------------------------------
Message: 1
Date: Tue, 13 Jan 2009 18:24:54 +0800
From: "Mark Schreiber" <markjschreiber at gmail.com>
Subject: Re: [Biojava-dev] XML Schema
To: "Ola Spjuth" <ola.spjuth at farmbio.uu.se>
Cc: biojava-dev at biojava.org
Message-ID:
<93b45ca50901130224x3eb19fdm1dcbe3487c2aba21 at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
The plan for biojava3 is that most or all of it will be POJO enough to
support JAXB binding. The JPA implementation of BioSQL objects in BJ3
is already XML compatible as the objects are entity beans and can be
transported via JAX-RPC.
- Mark
On Tue, Jan 13, 2009 at 3:38 PM, Ola Spjuth <ola.spjuth at farmbio.uu.se>
wrote:
>
> Hi,
>
> Does it exist an XML Schema (or compatible) for Biojava, or even better
a common schema for the Bio* projects? If not, is this in the pipe for
Biojava3?
>
> /Ola
>
> _______________________________________________
> biojava-dev mailing list
> biojava-dev at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biojava-dev
------------------------------
Message: 2
Date: Tue, 13 Jan 2009 12:46:50 +0100
From: Ola Spjuth <ola.spjuth at farmbio.uu.se>
Subject: Re: [Biojava-dev] XML Schema
To: Mark Schreiber <markjschreiber at gmail.com>
Cc: biojava-dev at biojava.org
Message-ID: <38E3B89D-0672-49BC-85F2-C8D579CEA260 at farmbio.uu.se>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
Hi Mark,
Thanks for the quick answer. Never used JAXB myself; does this
procedure support generation of an XML schema from code? I assume you
will annotate the POJO's with JAXB metadata? I usually work the other
way around and generate my model code from a model (usually based on
an XML Schema), I guess in the end it boils down to the same result?
Anyway, what is the preferred way of serializing current Biojava(X)
objects to XML? Via BioSQL in some way?
Cheers,
/Ola
On 13 jan 2009, at 11.24, Mark Schreiber wrote:
> The plan for biojava3 is that most or all of it will be POJO enough to
> support JAXB binding. The JPA implementation of BioSQL objects in BJ3
> is already XML compatible as the objects are entity beans and can be
> transported via JAX-RPC.
>
> - Mark
>
> On Tue, Jan 13, 2009 at 3:38 PM, Ola Spjuth
> <ola.spjuth at farmbio.uu.se> wrote:
>>
>> Hi,
>>
>> Does it exist an XML Schema (or compatible) for Biojava, or even
>> better a common schema for the Bio* projects? If not, is this in
>> the pipe for Biojava3?
>>
>> /Ola
>>
>> _______________________________________________
>> biojava-dev mailing list
>> biojava-dev at lists.open-bio.org
>> http://lists.open-bio.org/mailman/listinfo/biojava-dev
------------------------------
Message: 3
Date: Tue, 13 Jan 2009 20:52:38 +0800
From: "Mark Schreiber" <markjschreiber at gmail.com>
Subject: Re: [Biojava-dev] XML Schema
To: "Ola Spjuth" <ola.spjuth at farmbio.uu.se>
Cc: biojava-dev at biojava.org
Message-ID:
<93b45ca50901130452w202b7828t87b6b03a5b2b59ad at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Hi -
With JAXB you can annotate the POJOs with JAXB instructions although I
believe if you have a beany object and no annotation you get default
behavior if you don't annotate it. I think you can get a schema from
an object or auto generate objects from a schema (unless it is a bit
complex in which case you might need to put JAXB tags in the schema).
There is no clearcut way to get from biojavax to XML. This is because
of the heavy use of singletons and non-bean like objects in biojavax
(something that BJ3 will hopefully get away from). If you want to make
a custom XML serializer/ deserializer my recommendation would be to
put in a middle (transport) layer of beans that operate like the DTO's
of older EJB designs. They would basically be data holders that you
can generate from biojavax objects and then send to XML. Going the
other way you would generate these beans from XML and then use the
beans to generate biojavax objects (with singletons etc).
- Mark
On Tue, Jan 13, 2009 at 7:46 PM, Ola Spjuth <ola.spjuth at farmbio.uu.se>
wrote:
> Hi Mark,
>
> Thanks for the quick answer. Never used JAXB myself; does this procedure
> support generation of an XML schema from code? I assume you will
annotate
> the POJO's with JAXB metadata? I usually work the other way around and
> generate my model code from a model (usually based on an XML Schema), I
> guess in the end it boils down to the same result?
>
> Anyway, what is the preferred way of serializing current Biojava(X)
objects
> to XML? Via BioSQL in some way?
>
> Cheers,
>
> /Ola
>
> On 13 jan 2009, at 11.24, Mark Schreiber wrote:
>
>> The plan for biojava3 is that most or all of it will be POJO enough to
>> support JAXB binding. The JPA implementation of BioSQL objects in BJ3
>> is already XML compatible as the objects are entity beans and can be
>> transported via JAX-RPC.
>>
>> - Mark
>>
>> On Tue, Jan 13, 2009 at 3:38 PM, Ola Spjuth <ola.spjuth at farmbio.uu.se>
>> wrote:
>>>
>>> Hi,
>>>
>>> Does it exist an XML Schema (or compatible) for Biojava, or even
better a
>>> common schema for the Bio* projects? If not, is this in the pipe for
>>> Biojava3?
>>>
>>> /Ola
>>>
>>> _______________________________________________
>>> biojava-dev mailing list
>>> biojava-dev at lists.open-bio.org
>>> http://lists.open-bio.org/mailman/listinfo/biojava-dev
>
>
------------------------------
Message: 4
Date: Tue, 13 Jan 2009 20:54:10 +0800
From: "Mark Schreiber" <markjschreiber at gmail.com>
Subject: Re: [Biojava-dev] XML Schema
To: "Ola Spjuth" <ola.spjuth at farmbio.uu.se>
Cc: biojava-dev at biojava.org
Message-ID:
<93b45ca50901130454r1d9aa223j5646897950389108 at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Note that you could easily use the BJ3 BioSQL entity beans as the DTO
layer for biojavax if you wanted to write methods to convert biojavax
to the entity beans (shouldn't be hard as there is a very close
relationship).
- Mark
On Tue, Jan 13, 2009 at 8:52 PM, Mark Schreiber
<markjschreiber at gmail.com> wrote:
> Hi -
>
> With JAXB you can annotate the POJOs with JAXB instructions although I
> believe if you have a beany object and no annotation you get default
> behavior if you don't annotate it. I think you can get a schema from
> an object or auto generate objects from a schema (unless it is a bit
> complex in which case you might need to put JAXB tags in the schema).
>
> There is no clearcut way to get from biojavax to XML. This is because
> of the heavy use of singletons and non-bean like objects in biojavax
> (something that BJ3 will hopefully get away from). If you want to make
> a custom XML serializer/ deserializer my recommendation would be to
> put in a middle (transport) layer of beans that operate like the DTO's
> of older EJB designs. They would basically be data holders that you
> can generate from biojavax objects and then send to XML. Going the
> other way you would generate these beans from XML and then use the
> beans to generate biojavax objects (with singletons etc).
>
> - Mark
>
> On Tue, Jan 13, 2009 at 7:46 PM, Ola Spjuth <ola.spjuth at farmbio.uu.se>
wrote:
>> Hi Mark,
>>
>> Thanks for the quick answer. Never used JAXB myself; does this
procedure
>> support generation of an XML schema from code? I assume you will
annotate
>> the POJO's with JAXB metadata? I usually work the other way around and
>> generate my model code from a model (usually based on an XML Schema), I
>> guess in the end it boils down to the same result?
>>
>> Anyway, what is the preferred way of serializing current Biojava(X)
objects
>> to XML? Via BioSQL in some way?
>>
>> Cheers,
>>
>> /Ola
>>
>> On 13 jan 2009, at 11.24, Mark Schreiber wrote:
>>
>>> The plan for biojava3 is that most or all of it will be POJO enough to
>>> support JAXB binding. The JPA implementation of BioSQL objects in BJ3
>>> is already XML compatible as the objects are entity beans and can be
>>> transported via JAX-RPC.
>>>
>>> - Mark
>>>
>>> On Tue, Jan 13, 2009 at 3:38 PM, Ola Spjuth <ola.spjuth at farmbio.uu.se>
>>> wrote:
>>>>
>>>> Hi,
>>>>
>>>> Does it exist an XML Schema (or compatible) for Biojava, or even
better a
>>>> common schema for the Bio* projects? If not, is this in the pipe for
>>>> Biojava3?
>>>>
>>>> /Ola
>>>>
>>>> _______________________________________________
>>>> biojava-dev mailing list
>>>> biojava-dev at lists.open-bio.org
>>>> http://lists.open-bio.org/mailman/listinfo/biojava-dev
>>
>>
>
------------------------------
Message: 5
Date: Tue, 13 Jan 2009 14:47:53 +0100
From: Ola Spjuth <ola.spjuth at farmbio.uu.se>
Subject: Re: [Biojava-dev] XML Schema
To: Mark Schreiber <markjschreiber at gmail.com>
Cc: biojava-dev at biojava.org
Message-ID: <AEBE4FB4-BAA0-4E5D-99DD-90E2DC123B98 at farmbio.uu.se>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
Hi,
Seems a bit too time-consuming for me for the moment, I'll have to
wait for BJ3. Is there a roadmap/timeframe for this?
I just want to suggest (for BJ3 development) to have/generate an XML
Schema. At least I would benefit from this since I generate service
bindings on the fly and also want to validate data in remote services.
Cheers,
/Ola
On 13 jan 2009, at 13.52, Mark Schreiber wrote:
> Hi -
>
> With JAXB you can annotate the POJOs with JAXB instructions although I
> believe if you have a beany object and no annotation you get default
> behavior if you don't annotate it. I think you can get a schema from
> an object or auto generate objects from a schema (unless it is a bit
> complex in which case you might need to put JAXB tags in the schema).
>
> There is no clearcut way to get from biojavax to XML. This is because
> of the heavy use of singletons and non-bean like objects in biojavax
> (something that BJ3 will hopefully get away from). If you want to make
> a custom XML serializer/ deserializer my recommendation would be to
> put in a middle (transport) layer of beans that operate like the DTO's
> of older EJB designs. They would basically be data holders that you
> can generate from biojavax objects and then send to XML. Going the
> other way you would generate these beans from XML and then use the
> beans to generate biojavax objects (with singletons etc).
>
> - Mark
>
> On Tue, Jan 13, 2009 at 7:46 PM, Ola Spjuth
> <ola.spjuth at farmbio.uu.se> wrote:
>> Hi Mark,
>>
>> Thanks for the quick answer. Never used JAXB myself; does this
>> procedure
>> support generation of an XML schema from code? I assume you will
>> annotate
>> the POJO's with JAXB metadata? I usually work the other way around
>> and
>> generate my model code from a model (usually based on an XML
>> Schema), I
>> guess in the end it boils down to the same result?
>>
>> Anyway, what is the preferred way of serializing current Biojava(X)
>> objects
>> to XML? Via BioSQL in some way?
>>
>> Cheers,
>>
>> /Ola
>>
>> On 13 jan 2009, at 11.24, Mark Schreiber wrote:
>>
>>> The plan for biojava3 is that most or all of it will be POJO
>>> enough to
>>> support JAXB binding. The JPA implementation of BioSQL objects in
>>> BJ3
>>> is already XML compatible as the objects are entity beans and can be
>>> transported via JAX-RPC.
>>>
>>> - Mark
>>>
>>> On Tue, Jan 13, 2009 at 3:38 PM, Ola Spjuth <ola.spjuth at farmbio.uu.se
>>> >
>>> wrote:
>>>>
>>>> Hi,
>>>>
>>>> Does it exist an XML Schema (or compatible) for Biojava, or even
>>>> better a
>>>> common schema for the Bio* projects? If not, is this in the pipe
>>>> for
>>>> Biojava3?
>>>>
>>>> /Ola
>>>>
>>>> _______________________________________________
>>>> biojava-dev mailing list
>>>> biojava-dev at lists.open-bio.org
>>>> http://lists.open-bio.org/mailman/listinfo/biojava-dev
>>
>>
------------------------------
Message: 6
Date: Tue, 13 Jan 2009 13:47:42 +0000
From: Richard Holland <holland at eaglegenomics.com>
Subject: Re: [Biojava-dev] XML Schema
To: Ola Spjuth <ola.spjuth at farmbio.uu.se>
Cc: biojava-dev at biojava.org
Message-ID: <496C9B7E.2030600 at eaglegenomics.com>
Content-Type: text/plain; charset=ISO-8859-1
Sorry about that last one. I understand what you're getting at now.
There is no current roadmap/timeline for BJ3 as there is nobody
developing it except me and I've got lots of other things to do at the
moment, which involve getting paid and so sadly have to take priority.
Maybe there is someone out there who is willing to take responsibility
for it and project manage the BJ3 development?
cheers,
Richard
Ola Spjuth wrote:
> Hi,
>
> Seems a bit too time-consuming for me for the moment, I'll have to wait
> for BJ3. Is there a roadmap/timeframe for this?
>
> I just want to suggest (for BJ3 development) to have/generate an XML
> Schema. At least I would benefit from this since I generate service
> bindings on the fly and also want to validate data in remote services.
>
> Cheers,
>
> /Ola
>
> On 13 jan 2009, at 13.52, Mark Schreiber wrote:
>
>> Hi -
>>
>> With JAXB you can annotate the POJOs with JAXB instructions although I
>> believe if you have a beany object and no annotation you get default
>> behavior if you don't annotate it. I think you can get a schema from
>> an object or auto generate objects from a schema (unless it is a bit
>> complex in which case you might need to put JAXB tags in the schema).
>>
>> There is no clearcut way to get from biojavax to XML. This is because
>> of the heavy use of singletons and non-bean like objects in biojavax
>> (something that BJ3 will hopefully get away from). If you want to make
>> a custom XML serializer/ deserializer my recommendation would be to
>> put in a middle (transport) layer of beans that operate like the DTO's
>> of older EJB designs. They would basically be data holders that you
>> can generate from biojavax objects and then send to XML. Going the
>> other way you would generate these beans from XML and then use the
>> beans to generate biojavax objects (with singletons etc).
>>
>> - Mark
>>
>> On Tue, Jan 13, 2009 at 7:46 PM, Ola Spjuth <ola.spjuth at farmbio.uu.se>
>> wrote:
>>> Hi Mark,
>>>
>>> Thanks for the quick answer. Never used JAXB myself; does this
procedure
>>> support generation of an XML schema from code? I assume you will
>>> annotate
>>> the POJO's with JAXB metadata? I usually work the other way around and
>>> generate my model code from a model (usually based on an XML Schema),
I
>>> guess in the end it boils down to the same result?
>>>
>>> Anyway, what is the preferred way of serializing current Biojava(X)
>>> objects
>>> to XML? Via BioSQL in some way?
>>>
>>> Cheers,
>>>
>>> /Ola
>>>
>>> On 13 jan 2009, at 11.24, Mark Schreiber wrote:
>>>
>>>> The plan for biojava3 is that most or all of it will be POJO enough
to
>>>> support JAXB binding. The JPA implementation of BioSQL objects in BJ3
>>>> is already XML compatible as the objects are entity beans and can be
>>>> transported via JAX-RPC.
>>>>
>>>> - Mark
>>>>
>>>> On Tue, Jan 13, 2009 at 3:38 PM, Ola Spjuth
<ola.spjuth at farmbio.uu.se>
>>>> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> Does it exist an XML Schema (or compatible) for Biojava, or even
>>>>> better a
>>>>> common schema for the Bio* projects? If not, is this in the pipe for
>>>>> Biojava3?
>>>>>
>>>>> /Ola
>>>>>
>>>>> _______________________________________________
>>>>> biojava-dev mailing list
>>>>> biojava-dev at lists.open-bio.org
>>>>> http://lists.open-bio.org/mailman/listinfo/biojava-dev
>>>
>>>
>
> _______________________________________________
> biojava-dev mailing list
> biojava-dev at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biojava-dev
>
--
Richard Holland, BSc MBCS
Finance Director, Eagle Genomics Ltd
M: +44 7500 438846 | E: holland at eaglegenomics.com
http://www.eaglegenomics.com/
------------------------------
Message: 7
Date: Tue, 13 Jan 2009 14:03:26 +0000
From: markjschreiber at gmail.com
Subject: Re: [Biojava-dev] XML Schema
To: Ola Spjuth <ola.spjuth at farmbio.uu.se>, Mark Schreiber
<markjschreiber at gmail.com>, biojava-dev at biojava.org
Message-ID: <00163646ccdeea728e04605dafcc at google.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
It would probably be less time consuming to write the bridge than wait for
BJ3 which has no time frame as yet.
I also don't think there will be (or should be) a unified XML schema for
BJ3 as it will be much more modular (by design). Possibly each module
could
have a schema if relevant. Generally it is hoped that each module will be
compatible with bean like design (unless there is a good reason not to) so
this would implicitly mean there will be simple XML schema generation.
- Mark
On Jan 13, 2009 9:47pm, Ola Spjuth <ola.spjuth at farmbio.uu.se> wrote:
> Hi,
>
>
>
> Seems a bit too time-consuming for me for the moment, I'll have to wait
for BJ3. Is there a roadmap/timeframe for this?
>
>
>
> I just want to suggest (for BJ3 development) to have/generate an XML
Schema. At least I would benefit from this since I generate service
bindings on the fly and also want to validate data in remote services.
>
>
>
> Cheers,
>
>
>
> /Ola
>
>
>
> On 13 jan 2009, at 13.52, Mark Schreiber wrote:
>
>
>
>
> Hi -
>
>
>
> With JAXB you can annotate the POJOs with JAXB instructions although I
>
> believe if you have a beany object and no annotation you get default
>
> behavior if you don't annotate it. I think you can get a schema from
>
> an object or auto generate objects from a schema (unless it is a bit
>
> complex in which case you might need to put JAXB tags in the schema).
>
>
>
> There is no clearcut way to get from biojavax to XML. This is because
>
> of the heavy use of singletons and non-bean like objects in biojavax
>
> (something that BJ3 will hopefully get away from). If you want to make
>
> a custom XML serializer/ deserializer my recommendation would be to
>
> put in a middle (transport) layer of beans that operate like the DTO's
>
> of older EJB designs. They would basically be data holders that you
>
> can generate from biojavax objects and then send to XML. Going the
>
> other way you would generate these beans from XML and then use the
>
> beans to generate biojavax objects (with singletons etc).
>
>
>
> - Mark
>
>
>
> On Tue, Jan 13, 2009 at 7:46 PM, Ola Spjuth ola.spjuth at farmbio.uu.se>
wrote:
>
>
> Hi Mark,
>
>
>
> Thanks for the quick answer. Never used JAXB myself; does this procedure
>
> support generation of an XML schema from code? I assume you will
annotate
>
> the POJO's with JAXB metadata? I usually work the other way around and
>
> generate my model code from a model (usually based on an XML Schema), I
>
> guess in the end it boils down to the same result?
>
>
>
> Anyway, what is the preferred way of serializing current Biojava(X)
objects
>
> to XML? Via BioSQL in some way?
>
>
>
> Cheers,
>
>
>
> /Ola
>
>
>
> On 13 jan 2009, at 11.24, Mark Schreiber wrote:
>
>
>
>
> The plan for biojava3 is that most or all of it will be POJO enough to
>
> support JAXB binding. The JPA implementation of BioSQL objects in BJ3
>
> is already XML compatible as the objects are entity beans and can be
>
> transported via JAX-RPC.
>
>
>
> - Mark
>
>
>
> On Tue, Jan 13, 2009 at 3:38 PM, Ola Spjuth ola.spjuth at farmbio.uu.se>
>
> wrote:
>
>
>
>
> Hi,
>
>
>
> Does it exist an XML Schema (or compatible) for Biojava, or even better
a
>
> common schema for the Bio* projects? If not, is this in the pipe for
>
> Biojava3?
>
>
>
> /Ola
>
>
>
> _______________________________________________
>
> biojava-dev mailing list
>
> biojava-dev at lists.open-bio.org
>
> http://lists.open-bio.org/mailman/listinfo/biojava-dev
>
>
>
>
>
>
>
>
>
------------------------------
_______________________________________________
biojava-dev mailing list
biojava-dev at lists.open-bio.org
http://lists.open-bio.org/mailman/listinfo/biojava-dev
End of biojava-dev Digest, Vol 70, Issue 2
******************************************
More information about the biojava-dev
mailing list