I THINK you can do this with XJC plugins to the schema compiler. Not
really sure though. The XJC plugins can manipulate the generated
code, but I'm not sure the complete set of manipulations they can do.
This is really a JAXB question that might be best posted to the JAXB
lists.
Dan
On Jul 29, 2008, at 2:28 PM, Kugaprakash Visagamani wrote:
Hi,
Can some please help me with the following questions?
For instance I have a table of contents with each row is of type
"Content", and the ability of the column to sort/filter comes is
defined
in the XSD as part of the XSD definition given below:
<complexType: name="Content">
<complexContent>
<sequence>
<element name="slNo" type="int" isSortable="true"/>
<element name="content" type="string"
isFilterable="true" isSortable="true"/>
<element name="pageNo" type="int"/>
</sequence>
</complexContent>
</complexType>
Note that there are two additional special attributes (custom
attributes) for element ("isFilterable" and "isSortable") in the XSD.
Q1: These additional attributes can they be defined, if so can you
please let me know how?
Q2: Intention for these additional attribute is that, would like to
have
them as annotations in wsdlToJava generated objects, sample expected
result is given below:
Public class Content{
@SomeAnnotation(isFilterable="true")
Private int slNo;
@SomeAnnotation(isFilterable="true", isSortable="true")
Private String content
Private int pageNo;
.........
}
Is this possible to be able to generate our own annotations
(@SomeAnnotation)? Is so, please help me with a sample.
Q3: During the process of wsdltojava, can I try to create additional
helper methods? Like for the example above, I may need the following
API:
Public List<String> getFilterableAttributes()
Public List<String> getSortableAttributes()
Is it possible to be able generate additional helper methods?
Any help is highly appreciated.
Thanks
Kuga
---
Daniel Kulp
[EMAIL PROTECTED]
http://www.dankulp.com/blog