7
Po uruchomieniu komendy xjc -d src/ -p com.test IFC2X3.xsd
po wykonaniu polecenia xsd powoduje to konflikt.Jak użyć dostosowania klasy do rozwiązania konfliktu podczas generowania obiektu jaxb z xsd
....
<xs:element name="IfcCondenserTypeEnum" nillable="true">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="ifc:IfcCondenserTypeEnum">
<xs:attributeGroup ref="ex:instanceAttributes">
</xs:attributeGroup>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:simpleType name="IfcCondenserTypeEnum">
<xs:restriction base="xs:string">
<xs:enumeration value="watercooledshelltube">
</xs:enumeration>
<xs:enumeration value="watercooledshellcoil">
</xs:enumeration>
<xs:enumeration value="watercooledtubeintube">
</xs:enumeration>
<xs:enumeration value="watercooledbrazedplate">
</xs:enumeration>
<xs:enumeration value="aircooled">
</xs:enumeration>
<xs:enumeration value="evaporativecooled">
</xs:enumeration>
<xs:enumeration value="userdefined">
</xs:enumeration>
<xs:enumeration value="notdefined">
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
....
Błąd:
parsing a schema...
compiling a schema...
[ERROR] A class/interface with the same name "com.test.IfcCondenserTypeEnum" is already in use. Use a class customization to resolve this conflict.
line 14912 of file:/media/isuru/Projects/mitrai/bim_exchange/ifc_classes_v2x3/IFC2X3.xsd
[ERROR] (Relevant to above error) another "IfcCondenserTypeEnum" is generated from here.
line 14902 of file:/media/isuru/Projects/mitrai/bim_exchange/ifc_classes_v2x3/IFC2X3.xsd
Znalazłem kilka pytań dotyczących tego, ale to jej nie odpowiadając. Jak mogę rozwiązać ten problem jak sugeruje Use a class customization
Jestem stoi podobny problem. Ale mam około 20-30 takich zmiennych. Jakieś inne rozwiązanie tego? – wib
@wib: łatwo jest utworzyć jednorazowy arkusz stylów transformacji XSLT, który może utworzyć dla ciebie te wiązania. Zapewni ci to pełną swobodę. – Abel