use of org.eclipse.persistence.jaxb.TypeMappingInfo in project eclipselink by eclipse-ee4j.
the class ListOfDataHandlerTestCases 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);
Annotation[] annotations = new Annotation[2];
annotations[0] = getClass().getField("xmlMimeTypeField").getAnnotations()[0];
annotations[1] = getClass().getField("xmlAttachementRefField").getAnnotations()[0];
tpi.setAnnotations(annotations);
tpi.setType(getClass().getField("listField").getGenericType());
typeMappingInfos[0] = tpi;
}
return typeMappingInfos;
}
use of org.eclipse.persistence.jaxb.TypeMappingInfo in project eclipselink by eclipse-ee4j.
the class EmployeeAdapterTestCases method getTypeMappingInfos.
protected TypeMappingInfo[] getTypeMappingInfos() throws Exception {
if (typeMappingInfos == null) {
typeMappingInfos = new TypeMappingInfo[1];
TypeMappingInfo tmi = new TypeMappingInfo();
tmi.setXmlTagName(new QName("someUri", "testTagName"));
tmi.setElementScope(ElementScope.Global);
tmi.setNillable(true);
tmi.setType(Employee.class);
Annotation[] annotations = new Annotation[1];
annotations[0] = getClass().getField("javaTypeAdapterField").getAnnotations()[0];
tmi.setAnnotations(annotations);
typeMappingInfos[0] = tmi;
}
return typeMappingInfos;
}
use of org.eclipse.persistence.jaxb.TypeMappingInfo in project eclipselink by eclipse-ee4j.
the class ByteArrayTestCases method getTypeMappingInfos.
protected TypeMappingInfo[] getTypeMappingInfos() throws Exception {
if (typeMappingInfos == null) {
typeMappingInfos = new TypeMappingInfo[1];
TypeMappingInfo tmi = new TypeMappingInfo();
tmi.setXmlTagName(new QName("http://jaxb.dev.java.net/array", "testTagName"));
tmi.setElementScope(ElementScope.Global);
tmi.setType(getClass().getField("byteArrayField").getGenericType());
typeMappingInfos[0] = tmi;
}
return typeMappingInfos;
}
use of org.eclipse.persistence.jaxb.TypeMappingInfo in project eclipselink by eclipse-ee4j.
the class DatahandlerWithXMLTestCases method getTypeMappingInfos.
@Override
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);
// set annotations - should be ignored since XML wins
Annotation[] annotations = new Annotation[2];
annotations[0] = getClass().getField("xmlMimeTypeField").getAnnotations()[0];
annotations[1] = getClass().getField("xmlAttachementRefField").getAnnotations()[0];
tpi.setAnnotations(annotations);
tpi.setXmlElement(getXmlElement("<xml-element xml-mime-type=\"image/jpeg\" xml-attachment-ref=\"true\"/>"));
tpi.setType(DataHandler.class);
typeMappingInfos[0] = tpi;
}
return typeMappingInfos;
}
use of org.eclipse.persistence.jaxb.TypeMappingInfo in project eclipselink by eclipse-ee4j.
the class TypeMappingInfoObjectNewPrefixTestCases method getTypeMappingInfos.
protected TypeMappingInfo[] getTypeMappingInfos() throws Exception {
if (typeMappingInfos == null) {
typeMappingInfos = new TypeMappingInfo[2];
TypeMappingInfo tpi = new TypeMappingInfo();
tpi.setXmlTagName(new QName("differentURI", "response"));
tpi.setElementScope(ElementScope.Global);
tpi.setType(Object.class);
typeMappingInfos[0] = tpi;
TypeMappingInfo tmi = new TypeMappingInfo();
tmi.setType(Employee.class);
tmi.setElementScope(ElementScope.Global);
typeMappingInfos[1] = tmi;
}
return typeMappingInfos;
}
Aggregations