Customize element for abstract complexType with HyperJaxb3 The Next CEO of Stack OverflowCan an abstract class have a constructor?Sort ArrayList of custom Objects by propertyhyperjaxb3 xsd:string length in JPA entityHyperjaxb/JPA: reference an entity by its id instead of by valuecxf does not generate the expected type in WSDLCreating an XML element with xsi:nil and attributes in .Net/JaxbHyperjaxb ignoring customization in binding.xjbHyperjaxb3: Create lookup table from enumeration elementWhat's happening in HyperJaxb3 project?Why does Hyperjaxb3 generate RestItem classes?
Is micro rebar a better way to reinforce concrete than rebar?
RigExpert AA-35 - Interpreting The Information
Where do students learn to solve polynomial equations these days?
Why does the flight controls check come before arming the autobrake on the A320?
Proper way to express "He disappeared them"
Are police here, aren't itthey?
How to invert MapIndexed on a ragged structure? How to construct a tree from rules?
Chain wire methods together in Lightning Web Components
is it ok to reduce charging current for li ion 18650 battery?
Is there a difference between "Fahrstuhl" and "Aufzug"
How to avoid supervisors with prejudiced views?
Why is the US ranked as #45 in Press Freedom ratings, despite its extremely permissive free speech laws?
Would be okay to drive on this tire?
Make solar eclipses exceedingly rare, but still have new moons
Is it professional to write unrelated content in an almost-empty email?
Flying from Cape Town to England and return to another province
Method for adding error messages to a dictionary given a key
If Nick Fury and Coulson already knew about aliens (Kree and Skrull) why did they wait until Thor's appearance to start making weapons?
0 rank tensor vs 1D vector
Bartok - Syncopation (1): Meaning of notes in between Grand Staff
No sign flipping while figuring out the emf of voltaic cell?
What does "Its cash flow is deeply negative" mean?
Find non-case sensitive string in a mixed list of elements?
Solving system of ODEs with extra parameter
Customize element for abstract complexType with HyperJaxb3
The Next CEO of Stack OverflowCan an abstract class have a constructor?Sort ArrayList of custom Objects by propertyhyperjaxb3 xsd:string length in JPA entityHyperjaxb/JPA: reference an entity by its id instead of by valuecxf does not generate the expected type in WSDLCreating an XML element with xsi:nil and attributes in .Net/JaxbHyperjaxb ignoring customization in binding.xjbHyperjaxb3: Create lookup table from enumeration elementWhat's happening in HyperJaxb3 project?Why does Hyperjaxb3 generate RestItem classes?
I'm converting an XSD schema to a Java annotated bean for Hibernate with HyperJaxb3.
So far I managed to generate the Java objects, but I need to customize the remark field of the OperableType because the default generated length is 255 and I need to extend it to 4000.
Here's the fragment of the relevent xsd schema:
<xs:complexType name="OperableType" abstract="true">
<xs:annotation>
<xs:documentation xml:lang="en">OperableType contains all the elements and attributes common to all the operables. This is an abstract type, so no element of this type will be present in the XML.
The logical ID is a unique logical identifier of a sanctioned entity, of a regulation or of a detail of a sanction entity. This information is also provided to external actors for help, especially when entity multiple aliases make it difficult the identification task. For entities imported from previous database, the old value is retained.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="remark" type="fsdexport:UnlimitedTextType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="additionalInformation" type="fsdexport:AdditionalInfoType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="logicalId" type="xs:long" use="required"/>
</xs:complexType>
<xs:simpleType name="UnlimitedTextType">
<xs:restriction base="xs:string"/>
</xs:simpleType>
I can't modify the XSD schema nor the XML file I receive, so I need to customize the bindings for it to work.
I tried using this binding
<jxb:bindings node="xs:complexType[@name='OperableType']">
<jxb:bindings node="xs:sequence//xs:element[@name='remark']">
<hj:basic>
<orm:column length="4000" />
</hj:basic>
</jxb:bindings>
</jxb:bindings>
but it doesn't modify the length in the generated code.
@ElementCollection
@OrderColumn(name = "HJINDEX")
@Column(name = "HJVALUE", length = 255)
@CollectionTable(name = "OPERABLE_TYPE_REMARK", joinColumns =
@JoinColumn(name = "HJID")
)
public List<String> getRemark() {
I also tried to use 'hj:default-single-property' to customized the UnlimitedTextType but I didn't managed to make it work either.
java hibernate jaxb hyperjaxb
add a comment |
I'm converting an XSD schema to a Java annotated bean for Hibernate with HyperJaxb3.
So far I managed to generate the Java objects, but I need to customize the remark field of the OperableType because the default generated length is 255 and I need to extend it to 4000.
Here's the fragment of the relevent xsd schema:
<xs:complexType name="OperableType" abstract="true">
<xs:annotation>
<xs:documentation xml:lang="en">OperableType contains all the elements and attributes common to all the operables. This is an abstract type, so no element of this type will be present in the XML.
The logical ID is a unique logical identifier of a sanctioned entity, of a regulation or of a detail of a sanction entity. This information is also provided to external actors for help, especially when entity multiple aliases make it difficult the identification task. For entities imported from previous database, the old value is retained.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="remark" type="fsdexport:UnlimitedTextType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="additionalInformation" type="fsdexport:AdditionalInfoType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="logicalId" type="xs:long" use="required"/>
</xs:complexType>
<xs:simpleType name="UnlimitedTextType">
<xs:restriction base="xs:string"/>
</xs:simpleType>
I can't modify the XSD schema nor the XML file I receive, so I need to customize the bindings for it to work.
I tried using this binding
<jxb:bindings node="xs:complexType[@name='OperableType']">
<jxb:bindings node="xs:sequence//xs:element[@name='remark']">
<hj:basic>
<orm:column length="4000" />
</hj:basic>
</jxb:bindings>
</jxb:bindings>
but it doesn't modify the length in the generated code.
@ElementCollection
@OrderColumn(name = "HJINDEX")
@Column(name = "HJVALUE", length = 255)
@CollectionTable(name = "OPERABLE_TYPE_REMARK", joinColumns =
@JoinColumn(name = "HJID")
)
public List<String> getRemark() {
I also tried to use 'hj:default-single-property' to customized the UnlimitedTextType but I didn't managed to make it work either.
java hibernate jaxb hyperjaxb
add a comment |
I'm converting an XSD schema to a Java annotated bean for Hibernate with HyperJaxb3.
So far I managed to generate the Java objects, but I need to customize the remark field of the OperableType because the default generated length is 255 and I need to extend it to 4000.
Here's the fragment of the relevent xsd schema:
<xs:complexType name="OperableType" abstract="true">
<xs:annotation>
<xs:documentation xml:lang="en">OperableType contains all the elements and attributes common to all the operables. This is an abstract type, so no element of this type will be present in the XML.
The logical ID is a unique logical identifier of a sanctioned entity, of a regulation or of a detail of a sanction entity. This information is also provided to external actors for help, especially when entity multiple aliases make it difficult the identification task. For entities imported from previous database, the old value is retained.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="remark" type="fsdexport:UnlimitedTextType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="additionalInformation" type="fsdexport:AdditionalInfoType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="logicalId" type="xs:long" use="required"/>
</xs:complexType>
<xs:simpleType name="UnlimitedTextType">
<xs:restriction base="xs:string"/>
</xs:simpleType>
I can't modify the XSD schema nor the XML file I receive, so I need to customize the bindings for it to work.
I tried using this binding
<jxb:bindings node="xs:complexType[@name='OperableType']">
<jxb:bindings node="xs:sequence//xs:element[@name='remark']">
<hj:basic>
<orm:column length="4000" />
</hj:basic>
</jxb:bindings>
</jxb:bindings>
but it doesn't modify the length in the generated code.
@ElementCollection
@OrderColumn(name = "HJINDEX")
@Column(name = "HJVALUE", length = 255)
@CollectionTable(name = "OPERABLE_TYPE_REMARK", joinColumns =
@JoinColumn(name = "HJID")
)
public List<String> getRemark() {
I also tried to use 'hj:default-single-property' to customized the UnlimitedTextType but I didn't managed to make it work either.
java hibernate jaxb hyperjaxb
I'm converting an XSD schema to a Java annotated bean for Hibernate with HyperJaxb3.
So far I managed to generate the Java objects, but I need to customize the remark field of the OperableType because the default generated length is 255 and I need to extend it to 4000.
Here's the fragment of the relevent xsd schema:
<xs:complexType name="OperableType" abstract="true">
<xs:annotation>
<xs:documentation xml:lang="en">OperableType contains all the elements and attributes common to all the operables. This is an abstract type, so no element of this type will be present in the XML.
The logical ID is a unique logical identifier of a sanctioned entity, of a regulation or of a detail of a sanction entity. This information is also provided to external actors for help, especially when entity multiple aliases make it difficult the identification task. For entities imported from previous database, the old value is retained.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="remark" type="fsdexport:UnlimitedTextType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="additionalInformation" type="fsdexport:AdditionalInfoType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="logicalId" type="xs:long" use="required"/>
</xs:complexType>
<xs:simpleType name="UnlimitedTextType">
<xs:restriction base="xs:string"/>
</xs:simpleType>
I can't modify the XSD schema nor the XML file I receive, so I need to customize the bindings for it to work.
I tried using this binding
<jxb:bindings node="xs:complexType[@name='OperableType']">
<jxb:bindings node="xs:sequence//xs:element[@name='remark']">
<hj:basic>
<orm:column length="4000" />
</hj:basic>
</jxb:bindings>
</jxb:bindings>
but it doesn't modify the length in the generated code.
@ElementCollection
@OrderColumn(name = "HJINDEX")
@Column(name = "HJVALUE", length = 255)
@CollectionTable(name = "OPERABLE_TYPE_REMARK", joinColumns =
@JoinColumn(name = "HJID")
)
public List<String> getRemark() {
I also tried to use 'hj:default-single-property' to customized the UnlimitedTextType but I didn't managed to make it work either.
java hibernate jaxb hyperjaxb
java hibernate jaxb hyperjaxb
asked Mar 8 at 15:33
NicolasNicolas
515
515
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
After asking from help from the source,
https://github.com/highsource/hyperjaxb3/issues/54, I have the answer:
<jxb:bindings node="xs:complexType[@name='OperableType']">
<jxb:bindings node="xs:sequence//xs:element[@name='remark']">
<hj:element-collection>
<orm:column length="4000" />
</hj:element-collection>
</jxb:bindings>
</jxb:bindings>
The key is tu use hj:element-collection instead of hj:basic for an xml sequence.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55066392%2fcustomize-element-for-abstract-complextype-with-hyperjaxb3%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
After asking from help from the source,
https://github.com/highsource/hyperjaxb3/issues/54, I have the answer:
<jxb:bindings node="xs:complexType[@name='OperableType']">
<jxb:bindings node="xs:sequence//xs:element[@name='remark']">
<hj:element-collection>
<orm:column length="4000" />
</hj:element-collection>
</jxb:bindings>
</jxb:bindings>
The key is tu use hj:element-collection instead of hj:basic for an xml sequence.
add a comment |
After asking from help from the source,
https://github.com/highsource/hyperjaxb3/issues/54, I have the answer:
<jxb:bindings node="xs:complexType[@name='OperableType']">
<jxb:bindings node="xs:sequence//xs:element[@name='remark']">
<hj:element-collection>
<orm:column length="4000" />
</hj:element-collection>
</jxb:bindings>
</jxb:bindings>
The key is tu use hj:element-collection instead of hj:basic for an xml sequence.
add a comment |
After asking from help from the source,
https://github.com/highsource/hyperjaxb3/issues/54, I have the answer:
<jxb:bindings node="xs:complexType[@name='OperableType']">
<jxb:bindings node="xs:sequence//xs:element[@name='remark']">
<hj:element-collection>
<orm:column length="4000" />
</hj:element-collection>
</jxb:bindings>
</jxb:bindings>
The key is tu use hj:element-collection instead of hj:basic for an xml sequence.
After asking from help from the source,
https://github.com/highsource/hyperjaxb3/issues/54, I have the answer:
<jxb:bindings node="xs:complexType[@name='OperableType']">
<jxb:bindings node="xs:sequence//xs:element[@name='remark']">
<hj:element-collection>
<orm:column length="4000" />
</hj:element-collection>
</jxb:bindings>
</jxb:bindings>
The key is tu use hj:element-collection instead of hj:basic for an xml sequence.
answered Mar 11 at 9:43
NicolasNicolas
515
515
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55066392%2fcustomize-element-for-abstract-complextype-with-hyperjaxb3%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown