-
1. Re: Inline bindings with jbxb
aloubyansky Jun 1, 2005 9:41 AM (in response to aloubyansky)Current binding elements are described here http://www.jboss.org/wiki/Wiki.jsp?page=JBossXB_JBXBAnnotations
-
2. Re: Inline bindings with jbxb
adrian.brock Jun 1, 2005 3:52 PM (in response to aloubyansky)I'd like to drop the pojoserver test in the testsuite (I don't want to cross maintain
this everytime new features are added) in favour of more
clearly defined unit tests of the features I'm using in the MC (where they are not
already tested).
e.g.
1) recursion in the value processing
2) polymorphism in the value processing
3) holders
Basically, turn each one of the patterns I use in BeanSchemaBinding
into a unit test that can be tested with both a programmatic binding and an annotated
binding.
Does this sounds acceptable to you? -
3. Re: Inline bindings with jbxb
aloubyansky Jun 2, 2005 7:06 AM (in response to aloubyansky)> Does this sounds acceptable to you?
Yes. -
4. Re: Inline bindings with jbxb
aloubyansky Jun 14, 2005 5:52 AM (in response to aloubyansky)Here I explain binding to java.util.Map
http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossXB_BindingToJavaUtilMap
Any feedback is appreciated. -
5. Re: Inline bindings with jbxb
adrian.brock Jun 14, 2005 12:50 PM (in response to aloubyansky)I notice you didn't try to support
<map> <key>xxx</key><value>yyy</value> <key>zzz</key><value>qqq</value> </map>
What are the rules for referencing types across namespaces
and "parameterizing them"?
i.e. Is there a way for me to say I accept any of those map types and
but the implementation of the map/key/value should be of a specific class
or another element type?
e.g. I want would like to use any of your rules/bindings from the map namespace
but override the map type to AbstractMapMetaData and the key/value to
one of my ValueMetaData types. -
6. Re: Inline bindings with jbxb
aloubyansky Jun 15, 2005 8:15 AM (in response to aloubyansky)AFAIU, this style needs support for element group binding which is not supported yet. But I'll look into how hard it would be to add this and let you know.
I am not entirely clear about the other question.
As I understand it, there is a schema which is already bound. And you want to use that schema's types in your other schema and override type bindings from the first schema? -
7. Re: Inline bindings with jbxb
adrian.brock Jun 15, 2005 11:01 AM (in response to aloubyansky)"alex.loubyansky@jboss.com" wrote:
I am not entirely clear about the other question.
As I understand it, there is a schema which is already bound. And you want to use that schema's types in your other schema and override type bindings from the first schema?
Yes. I want to sort of inherit your complex type into my namespace and
specialize it (name the classes or maybe override the annotations?).
And also let the user choose what type of entry binding they would like to use
(the short form or the long form) depending upon whether the values are Strings or
something more complex?
i.e. JBossXB provides some template types for some of the more common
use cases.
I was merely asking whether such a thing is possible (even it it requires
creating some special jbxb annotations to define it?).
The two advantages are:
1) I don't have to do all the work of defining what a map means
2) Consistency of form across our schemas. -
8. Re: Inline bindings with jbxb
aloubyansky Jun 16, 2005 8:56 AM (in response to aloubyansky)Let's plan inheriting types and their bindings from other schemas for the future for now. It is possible. But I haven't tried it yet. In schemas it should be done with
<xsd:include schemaLocation="other.xsd"/>
jbxb:mapEntry, jbxb:mapEntryValue, jbxb:mapEntryKey are *mostly* assembling annotations. In some cases, mapEntry can define types to the entry itself and its value. Otherwise, you just use jbxb:class.
PS: I have a new getting started tutorial http://jboss.org/wiki/Wiki.jsp?page=JBossXB_POTutorial. I will probably edit it to include some more basic customizations.