gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-02 20:30:15 25 4
gpt4 key购买 nike

我正在基于 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

谢谢

最佳答案

抱歉,还不能发表评论......

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

关于rtc - 是否可以将 IBM RTC Advisor 字段集成到 JAXB,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27362577/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com