首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >是否可以将IBM RTC Advisor字段集成到JAXB

是否可以将IBM RTC Advisor字段集成到JAXB
EN

Stack Overflow用户
提问于 2014-12-09 00:38:14
回答 1查看 82关注 0票数 3

我正在从事IBM RTC Advisors的工作,基于http://jazz.net中提供的一个研讨会。

现在,我正在尝试将他们的OSGi模块中提供的xsd文档移植到annotations+jaxb。

这是XSD的一部分:

代码语言:javascript
复制
<xsd:element name="followup-action" substitutionGroup="process:followup-action"
    type="buildOnStateChangeType"/>

<xsd:complexType name="buildOnStateChangeType">
    <xsd:annotation>
        <xsd:documentation>
            This type defines the build on state change type. It is a
            subtype of the abstract process:followupActionType. This
            restriction, along with the substitutionGroup specification
            above, makes it possible to add configuration of the participant
            to a project or team area's process configuration. Note the
            forward references to the trigger and build types defined below.
            Take particular note of the id attribute. It is required and has
            a fixed value that points to our operation participant extension.
        </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
        <xsd:restriction base="process:followupActionType">
            <xsd:all>
                <xsd:element name="trigger" type="triggerType"
                    minOccurs="1" maxOccurs="1"/>
                <xsd:element name="build" type="buildType" minOccurs="1"
                    maxOccurs="1"/>
            </xsd:all>
            <xsd:attribute name="id" type="xsd:string" use="required"
                fixed="net.jazz.rtcext.workitem.extensions.service.buildOnStateChange"/>
        </xsd:restriction>
    </xsd:complexContent>
</xsd:complexType>

<xsd:complexType name="triggerType">
    <xsd:annotation>
        <xsd:documentation>
            This type defines the work item type to be monitored
            and the work item state that should trigger the
            operation participant.
        </xsd:documentation>
    </xsd:annotation>
    <xsd:all>
        <xsd:element name="changed-workitem-type" minOccurs="1"
            maxOccurs="1">
            <xsd:complexType>
                <xsd:attribute name="id" type="xsd:string"
                    use="required"/>
            </xsd:complexType>
        </xsd:element>
        <xsd:element name="trigger-state" minOccurs="1" maxOccurs="1">
            <xsd:complexType>
                <xsd:attribute name="id" type="xsd:string"
                    use="required"/>
            </xsd:complexType>
        </xsd:element>
    </xsd:all>
</xsd:complexType>

<xsd:complexType name="buildType">
    <xsd:annotation>
        <xsd:documentation>
            This type defines the build to run. At this point, it just
            includes the build definition id. In the future, it could
            include more information, for example, a list of properties
            to pass to the build.
        </xsd:documentation>
    </xsd:annotation>
    <xsd:all>
        <xsd:element name="build-definition" minOccurs="1" maxOccurs="1">
            <xsd:complexType>
                <xsd:attribute name="id" type="xsd:string"
                    use="required"/>
            </xsd:complexType>
        </xsd:element>
    </xsd:all>
</xsd:complexType>

这是XML from流程模板的一部分:

代码语言:javascript
复制
<followup-action
    xmlns="http://net.jazz.rtcext.workitem.extensions.service/server/buildOnStateChange"
    description="When the specified work item type changes to the specified state, the
    specified build will be requested."
    id="net.jazz.rtcext.workitem.extensions.service.buildOnStateChange"
    name="Build on State Change">
    <trigger>
        <changed-workitem-type id="com.ibm.team.apt.workItemType.story"/>
        <trigger-state id="com.ibm.team.apt.story.tested"/>
    </trigger>
    <build>
        <build-definition id="our.integration.build.bogus"/>
    </build>
</followup-action>

我的问题是,将XSD移植到带有JAXB注释的Java类的最佳方法是什么?我尝试使用Eclipse (露娜) JAXB支持进行反向工程。

来源:https://jazz.net/library/article/1000

谢谢

EN

回答 1

Stack Overflow用户

发布于 2015-04-01 17:28:10

对不起,现在还不能评论......

为什么你想要做你上面描述的事情?XSD描述的数据存储在流程配置中,并且有一组API可用于从扩展中访问数据。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/27362577

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档