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

时间:2014-12-08 16:38:14

标签: rtc extensibility jazz ibm-jazz

我正在研究基于http://jazz.net中提供的研讨会的IBM RTC Advisors。

现在我正在尝试将其OSGi模块中提供的xsd文档移植到注释+ jaxb。

这是XSD的一部分:

<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的一部分:

<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(Luna)JAXB支持进行逆向工程。

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

谢谢

1 个答案:

答案 0 :(得分:0)

对不起,还不能发表评论........

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