Examples of AttributeField


Examples of org.apache.axis2.rmi.metadata.AttributeField

                            field = new ElementField(propertyDescriptors[i], this.namespace);
                            field.populateMetaData(configurator, processedTypeMap);
                            this.elementFields.add(field);
                        } else {
                            // we use the attribute name space as null
                            field = new AttributeField(propertyDescriptors[i], null);
                            field.populateMetaData(configurator, processedTypeMap);
                            this.attributeFields.add(field);
                        }
                        if (fieldInfo.getXmlName() != null) {
                            field.setName(fieldInfo.getXmlName());
View Full Code Here

Examples of org.apache.axis2.rmi.metadata.AttributeField

                }

            }

            //add attribute fields
            AttributeField attributeField;
            for (Iterator iter = this.attributeFields.iterator(); iter.hasNext();){
                attributeField = (AttributeField) iter.next();
                if (!attributeField.isSchemaGenerated()){
                    // if it is not already processed process it.
                    attributeField.generateSchema(configurator,schemaMap);
                }
                this.xmlType.addAttribute(attributeField.getAttribute());
                // we have to set the namespaces of these element complex types properly
                QName attributeTypeQName = attributeField.getAttribute().getType().getQname();
                if (!xmlSchema.containsNamespace(attributeTypeQName.getNamespaceURI())){
                    // if the element namespace does not exists we have to add it
                    if (!attributeTypeQName.getNamespaceURI().equals(Constants.URI_2001_SCHEMA_XSD)) {
                        XmlImport xmlImport = new XmlImport(attributeTypeQName.getNamespaceURI());
                        xmlSchema.addImport(xmlImport);
View Full Code Here

Examples of org.apache.axis2.rmi.metadata.AttributeField

                } else {
                    // this is a complex type
                    try {

                        AttributeField attributeField;
                        Method getterMethod;
                        Object attributeFieldValue;
                        QName attributeQName;
                        for (Iterator iter = type.getAllAttributeFields().iterator(); iter.hasNext();) {
                            attributeField = (AttributeField) iter.next();
                            getterMethod = attributeField.getGetterMethod();
                            attributeFieldValue = getterMethod.invoke(object, new Object[]{});
                            attributeQName = new QName(attributeField.getNamespace(), attributeField.getName());
                            // calls to write attribute. for attributes we can have only simple types
                            if (attributeFieldValue != null) {
                                writeAttribute(writer,
                                        getSimpleTypeStringValue(attributeField.getType(), attributeFieldValue),
                                        attributeQName,
                                        namespacePrefix);
                            } else if (attributeField.isRequried()) {
                                throw new XmlSerializingException("Attribute value for attribute "
                                        + attributeField.getName() + " is required");
                            }

                        }

                        // write the element fields
View Full Code Here

Examples of org.apache.axis2.rmi.metadata.AttributeField

        }
    }

    private Map getJavaMethodValueHashMap(Type actualElementType, StatefulXMLStreamReader reader)
            throws XmlParsingException {
        AttributeField attributeField;
        String attributeVlaue;
        Object attributeObject;
        Map javaMethodToValueMap = new HashMap();
        for (Iterator iter = actualElementType.getAllAttributeFields().iterator();iter.hasNext();){
            attributeField = (AttributeField) iter.next();
            attributeVlaue = reader.getAttributeValue(attributeField.getNamespace(),
                                                    attributeField.getName());
            if (attributeVlaue != null) {
                attributeObject = getSimpleTypeObject(attributeField.getType(), reader, attributeVlaue);
                javaMethodToValueMap.put(attributeField.getSetterMethod(), attributeObject);
            } else if (attributeField.isRequried()){
                throw new XmlParsingException("Required attribute " + attributeField.getName() + " is missing");
            }

        }
        return javaMethodToValueMap;
    }
View Full Code Here

Examples of org.eclipse.persistence.platform.database.oracle.publisher.sqlrefl.AttributeField

        }
        listener.beginObjectType(sqlObjectType.getName());
        listener.handleObjectType(sqlObjectType.getName(), targetTypeName, numAttributes);
        if (fields != null && numAttributes > 0) {
            for (int idx = 0; idx < numAttributes; idx++) {
                AttributeField field = fields.get(idx);
                TypeClass typeClass = field.getType();
                listener.handleAttributeField(field.getName(), idx);
                ((SqlType)typeClass).accept(this);
            }
        }
        try {
            listener.endObjectType(sqlObjectType.getName());
View Full Code Here

Examples of org.eclipse.persistence.platform.database.oracle.publisher.sqlrefl.AttributeField

        }
        catch (Exception e) { /* ignore */ }
        listener.beginPlsqlRecord(plsqlRecordType.getTypeName(), targetTypeName, fieldsLength);
        if (fields != null && fieldsLength > 0) {
            for (int idx = 0; idx < fieldsLength; idx++) {
                AttributeField f = fields.get(idx);
                listener.beginPlsqlRecordField(f.getName(), idx);
                ((SqlType)f.getType()).accept(this);
                listener.endPlsqlRecordField(f.getName(), idx);
            }
        }
        try {
            listener.endPlsqlRecord(plsqlRecordType.getTypeName(),
                plsqlRecordType.getSqlTypeDecl(), plsqlRecordType.getSqlTypeDrop());
View Full Code Here

Examples of org.eclipse.persistence.platform.database.oracle.publisher.sqlrefl.AttributeField

        }
        listener.beginObjectType(sqlObjectType.getName());
        listener.handleObjectType(sqlObjectType.getName(), targetTypeName, numAttributes);
        if (fields != null && numAttributes > 0) {
            for (int idx = 0; idx < numAttributes; idx++) {
                AttributeField field = fields.get(idx);
                TypeClass typeClass = field.getType();
                listener.handleAttributeField(field.getName(), idx);
                ((SqlType)typeClass).accept(this);
            }
        }
        try {
            listener.endObjectType(sqlObjectType.getName());
View Full Code Here

Examples of org.eclipse.persistence.platform.database.oracle.publisher.sqlrefl.AttributeField

        }
        catch (Exception e) { /* ignore */ }
        listener.beginPlsqlRecord(plsqlRecordType.getTypeName(), targetTypeName, fieldsLength);
        if (fields != null && fieldsLength > 0) {
            for (int idx = 0; idx < fieldsLength; idx++) {
                AttributeField f = fields.get(idx);
                listener.beginPlsqlRecordField(f.getName(), idx);
                ((SqlType)f.getType()).accept(this);
                listener.endPlsqlRecordField(f.getName(), idx);
            }
        }
        try {
            listener.endPlsqlRecord(plsqlRecordType.getTypeName(),
                plsqlRecordType.getSqlTypeDecl(), plsqlRecordType.getSqlTypeDrop());
View Full Code Here

Examples of org.locationtech.udig.feature.editor.field.AttributeField

    public void propertyChange( PropertyChangeEvent event ) {
        super.propertyChange(event);
        if (event.getProperty().equals(AttributeField.IS_VALID)) {
            // a field has told us it is valid/invalid
            //
            AttributeField field = (AttributeField) event.getSource();
            String name = field.getAttributeName();
            boolean isValid = (Boolean) event.getNewValue();
           
            if (CURR_TYPE.equals( name )) {
                // if the curr_type field is not valid; disable currency code
                currCode.setEnabled(isValid);
View Full Code Here

Examples of org.locationtech.udig.feature.editor.field.AttributeField

    public void propertyChange( PropertyChangeEvent event ) {
        super.propertyChange(event);
        if (event.getProperty().equals(AttributeField.IS_VALID)) {
            // a field has told us it is valid/invalid
            //
            AttributeField field = (AttributeField) event.getSource();
            String name = field.getAttributeName();
            boolean isValid = (Boolean) event.getNewValue();
           
            if (CURR_TYPE.equals( name )) {
                // if the curr_type field is not valid; disable currency code
                currCode.setEnabled(isValid);
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.