You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Dimitris, this isn't probably the best place for me to put this issue. But perhaps you can forward it to the responsible persons.
Basically, to overcome the need of specifying in POJO (Plain Old Java Objects) classes manually the model (#1 ), I opted to use JAXB and XJC to extract classes from the main XSD - https://www.openaire.eu/schema/1.0/oaf-1.0.xsd.
But I had an issue extracting it:
parsing a schema...
[ERROR] Property "ClassId" is already defined. Use <jaxb:property> to resolve this conflict.
line 45 of file:/mnt/c/Users/pgraca/projects/openaire-funders-jaxb-model/src/main/resources/xsd/1.0/oaf-common-1.0.xsd
[ERROR] The following location is relevant to the above error
line 45 of file:/mnt/c/Users/pgraca/projects/openaire-funders-jaxb-model/src/main/resources/xsd/1.0/oaf-common-1.0.xsd
[ERROR] Property "Classname" is already defined. Use <jaxb:property> to resolve this conflict.
line 46 of file:/mnt/c/Users/pgraca/projects/openaire-funders-jaxb-model/src/main/resources/xsd/1.0/oaf-common-1.0.xsd
[ERROR] The following location is relevant to the above error
line 46 of file:/mnt/c/Users/pgraca/projects/openaire-funders-jaxb-model/src/main/resources/xsd/1.0/oaf-common-1.0.xsd
[ERROR] Property "Schemeid" is already defined. Use <jaxb:property> to resolve this conflict.
line 47 of file:/mnt/c/Users/pgraca/projects/openaire-funders-jaxb-model/src/main/resources/xsd/1.0/oaf-common-1.0.xsd
[ERROR] The following location is relevant to the above error
line 47 of file:/mnt/c/Users/pgraca/projects/openaire-funders-jaxb-model/src/main/resources/xsd/1.0/oaf-common-1.0.xsd
[ERROR] Property "Schemename" is already defined. Use <jaxb:property> to resolve this conflict.
line 48 of file:/mnt/c/Users/pgraca/projects/openaire-funders-jaxb-model/src/main/resources/xsd/1.0/oaf-common-1.0.xsd
[ERROR] The following location is relevant to the above error
line 48 of file:/mnt/c/Users/pgraca/projects/openaire-funders-jaxb-model/src/main/resources/xsd/1.0/oaf-common-1.0.xsd
Failed to parse a schema.
I initially thought the problem was with bidding. I tried several stuff. But eventually I look into the model and found an issue with with. Basically at oaf-common-1.0.xsd file we have:
<xs:attributeGroup name="dataInfoAttributeGroup">
<xs:attribute name="inferred" use="optional" type="xs:boolean">
<xs:annotation>
<xs:documentation>True if this information has been inferred by the automatic
inference algorithms run by OpenAIRE. </xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="trust" use="optional" type="xs:string">
<xs:annotation>
<xs:documentation>Value of trust of this information in the range [0,1]. More the
value, more trustworthy is the information. </xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="inferenceprovenance" use="optional" type="xs:string">
<xs:annotation>
<xs:documentation>Which algorithm inferred the current property. </xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup ref="qualifierAttributeGroup"></xs:attributeGroup>
</xs:attributeGroup>
But if we look into it closely we will find that dataInfoAttributeGroup already uses qualifierAttributeGroup, so it this definition we are creating some kind of loop. And that explained my errors. I simply removed the <xs:attributeGroup ref="qualifierAttributeGroup"/> and I was able to generate my POJO's classes. Having:
Hi Dimitris, this isn't probably the best place for me to put this issue. But perhaps you can forward it to the responsible persons.
Basically, to overcome the need of specifying in POJO (Plain Old Java Objects) classes manually the model (#1 ), I opted to use JAXB and XJC to extract classes from the main XSD - https://www.openaire.eu/schema/1.0/oaf-1.0.xsd.
But I had an issue extracting it:
I initially thought the problem was with bidding. I tried several stuff. But eventually I look into the model and found an issue with with. Basically at
oaf-common-1.0.xsd
file we have:and
But if we look into it closely we will find that
dataInfoAttributeGroup
already usesqualifierAttributeGroup
, so it this definition we are creating some kind of loop. And that explained my errors. I simply removed the<xs:attributeGroup ref="qualifierAttributeGroup"/>
and I was able to generate my POJO's classes. Having:Could you bring this to the people that define the schema, please?
The text was updated successfully, but these errors were encountered: