Package org.apache.cxf.aegis.type

Examples of org.apache.cxf.aegis.type.AegisType.readObject()


            }

            throw new DatabindingException("No mapped type for '" + typeName + "' (" + typeQName + ")");
        }

        return type.readObject(reader, context);
    }

    private QName extractQName(MessageReader reader, String typeName) {
        int colon = typeName.indexOf(':');
View Full Code Here


                        if (evReader.getName().equals(getKeyName())) {
                            AegisType kType = TypeUtil.getReadType(evReader.getXMLStreamReader(),
                                                              context.getGlobalContext(),
                                                              getKeyType());
                            key = kType.readObject(evReader, context);
                        } else if (evReader.getName().equals(getValueName())) {
                            AegisType vType = TypeUtil.getReadType(evReader.getXMLStreamReader(),
                                                              context.getGlobalContext(),
                                                              getValueType());
                            value = vType.readObject(evReader, context);
View Full Code Here

                            key = kType.readObject(evReader, context);
                        } else if (evReader.getName().equals(getValueName())) {
                            AegisType vType = TypeUtil.getReadType(evReader.getXMLStreamReader(),
                                                              context.getGlobalContext(),
                                                              getValueType());
                            value = vType.readObject(evReader, context);
                        } else {
                            readToEnd(evReader);
                        }
                    }
View Full Code Here

                QName name = childReader.getName();

                AegisType type = inf.getType(name);

                if (type != null) {
                    Object writeObj = type.readObject(childReader, context);
                    writeProperty(name, target, writeObj, clazz, inf);
                }
            }

            // Read child elements
View Full Code Here

                            ArrayType aType = (ArrayType) type;
                            PropertyDescriptor desc = inf.getPropertyDescriptorFromMappedName(name);
                            boolean isList =  List.class.isAssignableFrom(desc.getPropertyType());
                            writeObj = aType.readObject(childReader, name, context, !isList);
                        } else {
                            writeObj = type.readObject(childReader, context);
                        }

                        writeProperty(name, target, writeObj, clazz, propertyTypeInfo);
                    } else {
                        if (!alwaysAllowNillables() && !propertyTypeInfo.isNillable(name)) {
View Full Code Here

            }

            throw new DatabindingException("No mapped type for '" + typeName + "' (" + typeQName + ")");
        }

        return type.readObject(reader, context);
    }

    private QName extractQName(MessageReader reader, String typeName) {
        int colon = typeName.indexOf(':');
View Full Code Here

                QName name = childReader.getName();

                AegisType type = inf.getType(name);

                if (type != null) {
                    Object writeObj = type.readObject(childReader, context);
                    writeProperty(name, target, writeObj, clazz, inf);
                }
            }

            // Read child elements
View Full Code Here

                            ArrayType aType = (ArrayType) type;
                            PropertyDescriptor desc = inf.getPropertyDescriptorFromMappedName(name);
                            boolean isList =  List.class.isAssignableFrom(desc.getPropertyType());
                            writeObj = aType.readObject(childReader, name, context, !isList);
                        } else {
                            writeObj = type.readObject(childReader, context);
                        }

                        writeProperty(name, target, writeObj, clazz, propertyTypeInfo);
                    } else {
                        if (!alwaysAllowNillables() && !propertyTypeInfo.isNillable(name)) {
View Full Code Here

       
        if (type == null) {
            throw new DatabindingException(new Message("NO_MAPPING", LOG));
        }

        return type.readObject(elReader, context);
    }

    public Object readFlatArray(XMLStreamReader input,
                                ArrayType arrayType, QName concreteName) throws Exception {
        setupReaderPosition(input);
View Full Code Here

                QName qName = childReader.getName();
                AegisType defaultType = inf.getType(qName);
                AegisType type = TypeUtil.getReadType(childReader.getXMLStreamReader(),
                                                 context.getGlobalContext(), defaultType);
                if (type != null) {
                    String value = (String)type.readObject(childReader, context);
                    if ("id".equals(qName.getLocalPart())) {
                        id = value;
                    } else if ("name".equals(qName.getLocalPart())) {
                        name = value;
                    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.