use of org.eclipse.persistence.jaxb.TypeMappingInfo in project eclipselink by eclipse-ee4j.
the class ConflictingClassAndAdapterClassTestCases method getTypeMappingInfos.
protected TypeMappingInfo[] getTypeMappingInfos() throws Exception {
if (typeMappingInfos == null) {
typeMappingInfos = new TypeMappingInfo[6];
TypeMappingInfo tmi2 = new TypeMappingInfo();
tmi2.setXmlTagName(new QName("someUri", "testTagName2"));
tmi2.setElementScope(ElementScope.Global);
tmi2.setType(List.class);
Annotation[] annotations = new Annotation[1];
annotations[0] = getClass().getField("javaTypeAdapterField").getAnnotations()[0];
tmi2.setAnnotations(annotations);
typeMappingInfos[0] = tmi2;
TypeMappingInfo tmi = new TypeMappingInfo();
tmi.setXmlTagName(new QName("someUri", "testTagName1"));
tmi.setElementScope(ElementScope.Global);
tmi.setType(String.class);
typeMappingInfos[1] = tmi;
TypeMappingInfo tmi3 = new TypeMappingInfo();
tmi3.setXmlTagName(new QName("someUri", "testTagName3"));
tmi3.setElementScope(ElementScope.Global);
tmi3.setType(String.class);
typeMappingInfos[2] = tmi3;
TypeMappingInfo tmi4 = new TypeMappingInfo();
tmi4.setXmlTagName(new QName("someUri", "testTagName4"));
tmi4.setElementScope(ElementScope.Global);
tmi4.setType(List.class);
Annotation[] annotations2 = new Annotation[1];
annotations2[0] = getClass().getField("javaTypeAdapterField").getAnnotations()[0];
tmi4.setAnnotations(annotations2);
typeMappingInfos[3] = tmi4;
TypeMappingInfo tmi5 = new TypeMappingInfo();
tmi5.setXmlTagName(new QName("someUri", "testTagName5"));
tmi5.setElementScope(ElementScope.Global);
tmi5.setType(List.class);
Annotation[] annotations3 = new Annotation[1];
annotations3[0] = getClass().getField("javaTypeAdapterField2").getAnnotations()[0];
tmi5.setAnnotations(annotations3);
typeMappingInfos[4] = tmi5;
TypeMappingInfo tmi6 = new TypeMappingInfo();
tmi6.setXmlTagName(new QName("someUri", "testTagName6"));
tmi6.setElementScope(ElementScope.Global);
tmi6.setType(List.class);
Element xmlElement = getXmlElement("<xml-element xmlns='http://www.eclipse.org/eclipselink/xsds/persistence/oxm'><xml-java-type-adapter value='org.eclipse.persistence.testing.jaxb.typemappinginfo.ListToStringAdapter'/></xml-element>");
tmi6.setXmlElement(xmlElement);
typeMappingInfos[5] = tmi6;
}
return typeMappingInfos;
}
use of org.eclipse.persistence.jaxb.TypeMappingInfo in project eclipselink by eclipse-ee4j.
the class ConflictingClassesTestCases method getTypeMappingInfos.
protected TypeMappingInfo[] getTypeMappingInfos() throws Exception {
if (typeMappingInfos == null) {
typeMappingInfos = new TypeMappingInfo[2];
TypeMappingInfo tmi = new TypeMappingInfo();
tmi.setXmlTagName(new QName("someUri", "testTagName1"));
tmi.setElementScope(ElementScope.Global);
tmi.setType(Employee.class);
typeMappingInfos[0] = tmi;
TypeMappingInfo tmi2 = new TypeMappingInfo();
tmi2.setXmlTagName(new QName("someUri", "testTagName2"));
tmi2.setElementScope(ElementScope.Global);
tmi2.setType(Employee.class);
typeMappingInfos[1] = tmi2;
}
return typeMappingInfos;
}
use of org.eclipse.persistence.jaxb.TypeMappingInfo in project eclipselink by eclipse-ee4j.
the class RootLevelByteArrayEmptyContentTestCases method getTypeMappingInfos.
protected TypeMappingInfo[] getTypeMappingInfos() throws Exception {
if (typeMappingInfos == null) {
typeMappingInfos = new TypeMappingInfo[1];
TypeMappingInfo tpi = new TypeMappingInfo();
tpi.setXmlTagName(new QName("someUri", "testTagname"));
tpi.setElementScope(ElementScope.Global);
tpi.setType(byte[].class);
typeMappingInfos[0] = tpi;
}
return typeMappingInfos;
}
use of org.eclipse.persistence.jaxb.TypeMappingInfo in project eclipselink by eclipse-ee4j.
the class RootLevelByteArrayTestCases method getTypeMappingInfos.
protected TypeMappingInfo[] getTypeMappingInfos() throws Exception {
if (typeMappingInfos == null) {
typeMappingInfos = new TypeMappingInfo[1];
TypeMappingInfo tpi = new TypeMappingInfo();
tpi.setXmlTagName(new QName("someUri", "testTagname"));
tpi.setElementScope(ElementScope.Global);
tpi.setType(byte[].class);
typeMappingInfos[0] = tpi;
}
return typeMappingInfos;
}
use of org.eclipse.persistence.jaxb.TypeMappingInfo in project eclipselink by eclipse-ee4j.
the class ConflictingCollectionTestCases method getTypeMappingInfos.
protected TypeMappingInfo[] getTypeMappingInfos() throws Exception {
if (typeMappingInfos == null) {
typeMappingInfos = new TypeMappingInfo[6];
TypeMappingInfo tmi1 = new TypeMappingInfo();
tmi1.setElementScope(ElementScope.Global);
tmi1.setXmlTagName(new QName("collectionTag1"));
tmi1.setType(getClass().getField("collection1").getGenericType());
TypeMappingInfo tmi2 = new TypeMappingInfo();
tmi2.setElementScope(ElementScope.Global);
tmi2.setXmlTagName(new QName("collectionTag2"));
tmi2.setType(getClass().getField("collection2").getGenericType());
TypeMappingInfo tmi3 = new TypeMappingInfo();
tmi3.setElementScope(ElementScope.Global);
tmi3.setXmlTagName(new QName("collectionTag3"));
tmi3.setType(getClass().getField("collection3").getGenericType());
TypeMappingInfo tmi4 = new TypeMappingInfo();
tmi4.setElementScope(ElementScope.Global);
tmi4.setXmlTagName(new QName("collectionTag4"));
tmi4.setType(getClass().getField("collection4").getGenericType());
TypeMappingInfo tmi5 = new TypeMappingInfo();
tmi5.setElementScope(ElementScope.Global);
tmi5.setXmlTagName(new QName("collectionTag5"));
tmi5.setType(getClass().getField("collection5").getGenericType());
TypeMappingInfo tmi6 = new TypeMappingInfo();
tmi6.setElementScope(ElementScope.Global);
tmi6.setXmlTagName(new QName("collectionTag6"));
tmi6.setType(getClass().getField("collection6").getGenericType());
typeMappingInfos[0] = tmi1;
typeMappingInfos[1] = tmi2;
typeMappingInfos[2] = tmi3;
typeMappingInfos[3] = tmi4;
typeMappingInfos[4] = tmi5;
typeMappingInfos[5] = tmi6;
}
return typeMappingInfos;
}
Aggregations