Skip to content

Commit 7686c58

Browse files
committed
JAXB2 Basics 0.8.0.
1 parent 7c16a37 commit 7686c58

File tree

2 files changed

+3
-75
lines changed

2 files changed

+3
-75
lines changed

nodejs/scripts/jsonix.js

Lines changed: 1 addition & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -3326,78 +3326,6 @@ Jsonix.Schema.XSD.AnyType = Jsonix.Class(Jsonix.Model.ClassInfo, {
33263326
} ]
33273327
});
33283328
},
3329-
/* unmarshal : function(context, input, scope) {
3330-
var result = [];
3331-
// Process the attributes
3332-
var attributeCount = input.getAttributeCount();
3333-
if (attributeCount > 0) {
3334-
for ( var index = 0; index < attributeCount; index++) {
3335-
var attributeNameKey = input.getAttributeNameKey(index);
3336-
var attributeValue = input.getAttributeValue(index);
3337-
if (Jsonix.Util.Type.isString(attributeValue)) {
3338-
var attributeItem = {};
3339-
attributeItem['@' + attributeNameKey] = attributeValue;
3340-
result.push(attributeItem);
3341-
}
3342-
}
3343-
}
3344-
var et = input.next();
3345-
while (et !== Jsonix.XML.Input.END_ELEMENT)
3346-
{
3347-
if (et === Jsonix.XML.Input.START_ELEMENT)
3348-
{
3349-
// Unmarshal element
3350-
result.push(this.unmarshalElement(context, input, scope));
3351-
}
3352-
else if (et === Jsonix.XML.Input.CHARACTERS || et === Jsonix.XML.Input.CDATA || et === Jsonix.XML.Input.ENTITY_REFERENCE)
3353-
{
3354-
result.push(input.getText());
3355-
3356-
}
3357-
else if (et === Jsonix.XML.Input.SPACE)
3358-
{
3359-
// Skip space
3360-
}
3361-
else if (et === Jsonix.XML.Input.COMMENT || et === Jsonix.XML.Input.PROCESSING_INSTRUCTION)
3362-
{
3363-
// Skip comments and processing instructions
3364-
} else {
3365-
// TODO better exception
3366-
throw new Error("Illegal state: unexpected event type [" + et + "].");
3367-
}
3368-
et = input.next();
3369-
}
3370-
return result;
3371-
},
3372-
unmarshalElement : function(context, input, scope) {
3373-
var name = input.getName();
3374-
var value;
3375-
if (Jsonix.Util.Type.exists(context.getElementInfo(name, scope))) {
3376-
// TODO optimize
3377-
var elementDeclaration = context.getElementInfo(name, scope);
3378-
var typeInfo = elementDeclaration.typeInfo;
3379-
var adapter = Jsonix.Model.Adapter.getAdapter(elementDeclaration);
3380-
value = {
3381-
name : name,
3382-
value : adapter.unmarshal(typeInfo, context, input, scope)
3383-
};
3384-
} else {
3385-
value = input.getElement();
3386-
}
3387-
return value;
3388-
},
3389-
marshal : function(value, context, output, scope) {
3390-
console.log("context");
3391-
console.log(context);
3392-
console.log("value");
3393-
console.log(value);
3394-
console.log("output");
3395-
console.log(output);
3396-
throw new Error("Abstract method [marshal].");
3397-
},
3398-
isInstance : function(value, context, scope) {
3399-
throw new Error('Abstract method [isInstance].');
3400-
},*/
34013329
CLASS_NAME : 'Jsonix.Schema.XSD.AnyType'
34023330
});
34033331
Jsonix.Schema.XSD.AnyType.INSTANCE = new Jsonix.Schema.XSD.AnyType();
@@ -5110,7 +5038,7 @@ Jsonix.Context = Jsonix
51105038
Jsonix.Schema.XSD.NormalizedString.INSTANCE,
51115039
Jsonix.Schema.XSD.Number.INSTANCE,
51125040
Jsonix.Schema.XSD.PositiveInteger.INSTANCE,
5113-
Jsonix.Schema.XSD.QName.INSTANCE,
5041+
// Jsonix.Schema.XSD.QName.INSTANCE,
51145042
Jsonix.Schema.XSD.Short.INSTANCE,
51155043
Jsonix.Schema.XSD.String.INSTANCE,
51165044
Jsonix.Schema.XSD.Strings.INSTANCE,

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@
8888
</mailingLists>
8989
<properties>
9090
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
91-
<jsonix-schema-compiler.version>2.0.11</jsonix-schema-compiler.version>
92-
<jaxb2-basics.version>0.7.0</jaxb2-basics.version>
91+
<jsonix-schema-compiler.version>2.1.0</jsonix-schema-compiler.version>
92+
<jaxb2-basics.version>0.8.0</jaxb2-basics.version>
9393
<jaxb-ri.version>2.1.13</jaxb-ri.version>
9494
<maven-jaxb2-plugin.version>0.9.0</maven-jaxb2-plugin.version>
9595
</properties>

0 commit comments

Comments
 (0)