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?










0















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.










share|improve this question


























    0















    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.










    share|improve this question
























      0












      0








      0








      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.










      share|improve this question














      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






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 8 at 15:33









      NicolasNicolas

      515




      515






















          1 Answer
          1






          active

          oldest

          votes


















          0














          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.






          share|improve this answer























            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
            );



            );













            draft saved

            draft discarded


















            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









            0














            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.






            share|improve this answer



























              0














              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.






              share|improve this answer

























                0












                0








                0







                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.






                share|improve this answer













                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.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 11 at 9:43









                NicolasNicolas

                515




                515





























                    draft saved

                    draft discarded
















































                    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.




                    draft saved


                    draft discarded














                    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





















































                    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







                    Popular posts from this blog

                    Thal And Out Agency railway station See also References External links Navigation menuOfficial Web Site of Pakistan RailwaysArchivedOfficial Web Site of Pakistan Railwayseeexpanding ite

                    Understanding generators in Python2019 Community Moderator ElectionGenerator function not working pythonFor loop not executing two timesGenerators - Printing generated valuesWhy can a python generator only be used once?What exactly do generators do?What does the “yield” keyword do?What does “list comprehension” mean? How does it work and how can I use it?sklearn Kfold acces single fold instead of for loopIs a generator the callable? Which is the generator?Apply Border To Range Of Cells Using OpenpyxlCalling an external command in PythonWhat are metaclasses in Python?What is the difference between @staticmethod and @classmethod?Finding the index of an item given a list containing it in PythonDifference between append vs. extend list methods in PythonHow can I safely create a nested directory in Python?Does Python have a ternary conditional operator?Understanding slice notationUnderstanding Python super() with __init__() methodsDoes Python have a string 'contains' substring method?

                    How can I change the color of pagination dots of UIPageControl?How to change UIPageControl dotsIs there a way to change page indicator dots colorCustomize dot with image of UIPageControl at index 0 of UIPageControlNo visible @interface for 'NSObject<PageControlDelegate>' declares the selector 'pageControlPageDidChange:'How to change the color of pagination dots in UIPageControl with a different color per pagepagecontrol indicator custom image instead of DefaultChanging the colour of UIPageControl dots in MonoTouchpagecontrol selectable page visibility color?Alternative way to load ViewControllers on a UIPageControlHow to set only layer.border-color for UIpage control dots in swiftHow can I develop for iPhone using a Windows development machine?How to change the name of an iOS app?UITableView - change section header coloruipagecontrol indicator(dot)issueCustom UIPageControl dots color not changingchange the interspace between UIPageControl dotsHow to change Status Bar text color in iOSHow can I change image tintColor in iOS and WatchKitUIPageControl dots with larger space in between each dotsHow to change the color of pagination dots in UIPageControl with a different color per page