Re: [Simple-support] Converting from JAXB to Simple XML
Brought to you by:
niallg
|
From: Niall G. <gal...@ya...> - 2012-12-06 10:13:01
|
Hi,
I have answered where I could, I am not familiar with some of the more obscure JAXB annotations.
> 1. Translation
> missing.
>
>
>
>
> @XmlType(name
> = "",
> propOrder = {
>
> "lala"
>
>
> })
>
This looks like its a mix of two Simple annotations
@Root
@Order(elements="lala")
>
> 2. Translation
> missing.
>
>
> @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
>
>
> @XmlSchemaType(name
> = "NMTOKEN")
>
@Convert(CollapsedStringConverter.class)
Here you will need a special Strategy implementation called AnnotationStrategy. See the tutorial or javadoc for more info.
>
> 3. Translation missing + need to get rid of
> JAXBElement.
>
>
>
>
> @XmlElementDecl(namespace
> = "",
> name = "SerialNumber",
> scope = TCompatibility.class)
>
>
> public
> JAXBElement<TCompatibilityExpression>
> createTCompatibilitySerialNumber(TCompatibilityExpression
> value) {
>
> return
> new
> JAXBElement<TCompatibilityExpression>(_TCompatibilitySerialNumber_QNAME,
> TCompatibilityExpression.class,
> TCompatibility.class,
> value);
>
> }
>
Not sure about this, but namespaces are @Namespace(prefix="xx", reference="http://blah.blah")
> 4. Translation missing.
>
>
>
> @XmlSeeAlso({
>
>
>
> TArrayTypeNamed.class
>
>
> })
>
This contributes nothing from what I know, just ignore it.
>
> 5. Translation missing.
>
> @XmlElements({
>
>
> @Element(required=false,name
> = "PatternGroup",
> type = TPatternGroup.class),
>
>
> @Element(required=false,name
> = "Pattern",
> type = TPattern.class)
>
>
> })
>
@ElementUnion({
@Element(name="PatternGroup", type=TPatternGroup.class),
@Element(name="Pattern, type=TPattern.class)
})
>
> 6. Translation missing + need to get rid of
> JAXBElement.
>
>
>
>
> @XmlElementRefs({
>
>
> @XmlElementRef(name
> = "lala",
> type = JAXBElement.class),
>
>
> @XmlElementRef(name
> = "lulu",
> type = JAXBElement.class),
>
>
> @XmlElementRef(name
> = "haha",
> type = JAXBElement.class),
>
>
> @XmlElementRef(name
> = "mmmh",
> type = JAXBElement.class)
>
>
> })
>
> protected
> List<JAXBElement<TCompatibilityExpression>>
> deviceXXX;
>
Again look at @ElementUnion
>
> 7. Translation missing.
>
>
>
>
> @XmlValue
>
>
> protected
> String value;
>
@Text i think
>
>
> 8. Translation missing.
>
>
>
> @XmlElements({
>
>
> @Element(required=false,name
> = "Variable",
> type = TVariable.class),
>
>
> @Element(required=false,name
> = "MethodIn",
> type = TMethodIn.class),
>
>
> @XmlElement(name
> = "File",
> type = TFile.class),
>
>
> @Element(required=false,name
> = "EventOut",
> type = TEventOut.class)
>
>
> })
>
> protected
> List<Object> variableOrEventOutOrMethodIn;
>
@ElementUnion I think
>
>
> 9. Translation missing.
>
>
>
>
> @XmlSchemaType(name
> = "positiveInteger")
>
>
> protected
> BigInteger binFixPointPos;
>
@Element i guess.
I am not overly familiar with the SED script. However I think it should be possible to convert just about anything JAXB can do to Simple.
|