Examples of XMLType


Examples of gc.base.xmltypes.XmlType

    long t2 = System.currentTimeMillis();
    stats.incrementTime(tn+".makeXmlDom",t2-t1);
   
    // interrogate the metadata document
    XmlInterrogator interrogator = new XmlInterrogator();
    XmlType xmlType = interrogator.interrogate(xmlTypes,dom);
    XsltReference xsltReference = xmlType.getToSolrXslt();
    XsltTemplate xsltTemplate = XsltTemplates.getCompiledTemplate(xsltReference.getSrc());
    info.MetadataType_Key = xmlType.getKey();
    info.MetadataType_Identifier = xmlType.getIdentifier();
    info.MetadataType_Indexables_Version = xsltReference.getVersion();
    long t3 = System.currentTimeMillis();
    stats.incrementTime(tn+".interrogateXmlType",t3-t2);
   
    // append fields at the top of the document
View Full Code Here

Examples of javax.xml.bind.annotation.XmlType

    if (schema != null && ! "".equals(schema.namespace()))
      namespace = schema.namespace();

    if (cl.isAnnotationPresent(XmlType.class)) {
      XmlType xmlType = (XmlType) cl.getAnnotation(XmlType.class);

      if (! "##default".equals(xmlType.name()))
        name = xmlType.name();

      if (! "##default".equals(xmlType.namespace()))
        namespace = xmlType.namespace();
    }

    if (name == null)
      name = identifierToXmlName(cl);
View Full Code Here

Examples of javax.xml.bind.annotation.XmlType

                schemaInfo = s;
                break;
            }
        }
        XmlAccessorOrder xmlAccessorOrder = cls.getAnnotation(XmlAccessorOrder.class);
        XmlType xmlTypeAnno = cls.getAnnotation(XmlType.class);
        String[] propertyOrder = null;
        boolean respectXmlTypeNS = false;
        XmlSchema faultBeanSchema = null;
        if (xmlTypeAnno != null && !StringUtils.isEmpty(xmlTypeAnno.namespace())
            && !xmlTypeAnno.namespace().equals(part.getElementQName().getNamespaceURI())) {
            respectXmlTypeNS = true;
            NamespaceMap nsMap = new NamespaceMap();
            nsMap.add(WSDLConstants.CONVENTIONAL_TNS_PREFIX, xmlTypeAnno.namespace());
            nsMap.add(WSDLConstants.NP_SCHEMA_XSD, WSDLConstants.NS_SCHEMA_XSD);
           
            SchemaInfo faultBeanSchemaInfo = createSchemaIfNeeded(xmlTypeAnno.namespace(), nsMap);
            faultBeanSchema = faultBeanSchemaInfo.getSchema();
        }
       
        if (xmlTypeAnno != null &&  xmlTypeAnno.propOrder().length > 0) {
            propertyOrder = xmlTypeAnno.propOrder();
            //TODO: handle @XmlAccessOrder
        }
                       
        XmlSchema schema = null;
        if (schemaInfo == null) {
            NamespaceMap nsMap = new NamespaceMap();
            nsMap.add(WSDLConstants.CONVENTIONAL_TNS_PREFIX, part.getElementQName().getNamespaceURI());
            nsMap.add(WSDLConstants.NP_SCHEMA_XSD, WSDLConstants.NS_SCHEMA_XSD);
            schemaInfo = createSchemaIfNeeded(part.getElementQName().getNamespaceURI(), nsMap);

        }
        schema = schemaInfo.getSchema();
      

        // Before updating everything, make sure we haven't added this
        // type yet.  Multiple methods that throw the same exception
        // types will cause duplicates.
        String faultTypeName = xmlTypeAnno != null && !StringUtils.isEmpty(xmlTypeAnno.name())
               ? xmlTypeAnno.name()  :  part.getElementQName().getLocalPart();
        XmlSchemaType existingType = schema.getTypeByName(faultTypeName);
        if (existingType != null) {
            return;
        }
View Full Code Here

Examples of javax.xml.bind.annotation.XmlType

    private QName getTypeQName(Class<?> cls, String namespace) {
        QName qn = TYPE_MAP.get(cls);
        if (qn != null) {
            return qn;
        }
        XmlType xtype = cls.getAnnotation(XmlType.class);
        String tn = xtype == null ? "##default" : xtype.name();
        String tns = xtype == null ? "##default" : xtype.namespace();
        if ("##default".equals(tn)) {
            tn = java.beans.Introspector.decapitalize(cls.getSimpleName());
        }
        if ("##default".equals(tns) || StringUtils.isEmpty(tns)) {
            tns = JAXBUtils.getPackageNamespace(cls);
View Full Code Here

Examples of javax.xml.bind.annotation.XmlType

                schemaInfo = s;
                break;
            }
        }
        XmlAccessorOrder xmlAccessorOrder = cls.getAnnotation(XmlAccessorOrder.class);
        XmlType xmlTypeAnno = cls.getAnnotation(XmlType.class);
        String[] propertyOrder = null;
        boolean respectXmlTypeNS = false;
        XmlSchema faultBeanSchema = null;
        if (xmlTypeAnno != null && !StringUtils.isEmpty(xmlTypeAnno.namespace())
            && !xmlTypeAnno.namespace().equals(part.getElementQName().getNamespaceURI())) {
            respectXmlTypeNS = true;
            NamespaceMap nsMap = new NamespaceMap();
            nsMap.add(WSDLConstants.CONVENTIONAL_TNS_PREFIX, xmlTypeAnno.namespace());
            nsMap.add(WSDLConstants.NP_SCHEMA_XSD, WSDLConstants.NS_SCHEMA_XSD);
           
            SchemaInfo faultBeanSchemaInfo = createSchemaIfNeeded(xmlTypeAnno.namespace(), nsMap);
            faultBeanSchema = faultBeanSchemaInfo.getSchema();
        }
       
        if (xmlTypeAnno != null &&  xmlTypeAnno.propOrder().length > 0) {
            propertyOrder = xmlTypeAnno.propOrder();
            //TODO: handle @XmlAccessOrder
        }
                       
        XmlSchema schema = null;
        if (schemaInfo == null) {
            NamespaceMap nsMap = new NamespaceMap();
            nsMap.add(WSDLConstants.CONVENTIONAL_TNS_PREFIX, part.getElementQName().getNamespaceURI());
            nsMap.add(WSDLConstants.NP_SCHEMA_XSD, WSDLConstants.NS_SCHEMA_XSD);
            schemaInfo = createSchemaIfNeeded(part.getElementQName().getNamespaceURI(), nsMap);

        }
        schema = schemaInfo.getSchema();
      

        // Before updating everything, make sure we haven't added this
        // type yet.  Multiple methods that throw the same exception
        // types will cause duplicates.
        String faultTypeName = xmlTypeAnno != null && !StringUtils.isEmpty(xmlTypeAnno.name())
               ? xmlTypeAnno.name()  :  part.getElementQName().getLocalPart();
        XmlSchemaType existingType = schema.getTypeByName(faultTypeName);
        if (existingType != null) {
            return;
        }
View Full Code Here

Examples of javax.xml.bind.annotation.XmlType

  }

  public static ElementInfo getXmlElementInfo(Class<?> clazz) {
    String elementName = null;
    String namespace = null;
    XmlType xmlType = clazz.getAnnotation(XmlType.class);
    if (xmlType != null) {
      elementName = xmlType.name();
      namespace = xmlType.namespace();
    } else {
      XmlRootElement xmlRootElement = clazz.getAnnotation(XmlRootElement.class);
      if (xmlRootElement != null) {
        elementName = xmlRootElement.name();
        namespace = xmlRootElement.namespace();
View Full Code Here

Examples of javax.xml.bind.annotation.XmlType

            XmlSchema schema = pkg.getAnnotation(XmlSchema.class);
            if (schema != null) {
                namespace = schema.namespace();
            }
        }
        XmlType type = javaType.getAnnotation(XmlType.class);
        if (type != null) {
            String typeNamespace = type.namespace();
            String typeName = type.name();

            if (typeNamespace.equals("##default") && typeName.equals("")) {
                XmlRootElement rootElement = javaType.getAnnotation(XmlRootElement.class);
                if (rootElement != null) {
                    namespace = rootElement.namespace();
View Full Code Here

Examples of oracle.xdb.XMLType

        }
       
    }
   
    private static void readObjectUsingXmlType(OPAQUE opaque) throws Exception {
        XMLType xml = XMLType.createXML(opaque);
        System.out.println("readObjectUsingXmlType: "+xml.getStringVal());
    }
View Full Code Here

Examples of org.apache.axis.encoding.XMLType

            MessageContext msgContext = context.getMessageContext();
            Message        msg = msgContext.getCurrentMessage();
            if ( msg != null && msg.getMessageType() == Message.RESPONSE ) {
                Call c = (Call) msgContext.getProperty( MessageContext.CALL );
                if ( c != null ) {
                    XMLType xmlType = null ;

                    // First look for this param by name
                    xmlType = (XMLType) c.getParameterTypeByName(localName);

                    // If we can't find it by name then assume it must
                    // be the return type - is this correct/safe????
                    if ( xmlType == null )
                        xmlType = (XMLType) c.getReturnType();

                    // Now get the QName
                    if ( xmlType != null )
                        type = xmlType.getType();
                }
            }

            if (type == null && defaultParamTypes!=null &&
                params.size()<=defaultParamTypes.length) {
View Full Code Here

Examples of org.apache.axis2.rmi.metadata.xml.XmlType

            this.inputElement.setNamespace(this.namespace);
            this.inputElement.setTopElement(true);
            xmlSchema.addElement(this.inputElement);

            // set the complex type for this element
            XmlType xmlType = new XmlTypeImpl();
            xmlType.setAnonymous(true);
            xmlType.setSimpleType(false);

            Parameter parameter;
            for (Iterator iter = this.inputParameters.iterator(); iter.hasNext();) {
                parameter = (Parameter) iter.next();
                if (!parameter.isSchemaGenerated()){
                   parameter.generateSchema(configurator,schemaMap);
                }
                parameter.getElement().setTopElement(false);
                xmlType.addElement(parameter.getElement());
                QName elementTypeQName = parameter.getElement().getType().getQname();
                if (!xmlSchema.containsNamespace(elementTypeQName.getNamespaceURI())) {
                    // if the element namespace does not exists we have to add it
                    if (!elementTypeQName.getNamespaceURI().equals(Constants.URI_2001_SCHEMA_XSD)) {
                        XmlImport xmlImport = new XmlImport(elementTypeQName.getNamespaceURI());
                        xmlSchema.addImport(xmlImport);
                    }
                    xmlSchema.addNamespace(elementTypeQName.getNamespaceURI());
                }
            }

            this.inputElement.setType(xmlType);

            // generate the output Element
            this.outPutElement = new XmlElementImpl(false);
            this.outPutElement.setName(this.name + "Response");
            this.outPutElement.setNamespace(this.namespace);
            this.outPutElement.setTopElement(true);
            xmlSchema.addElement(this.outPutElement);

            xmlType = new XmlTypeImpl();
            xmlType.setAnonymous(true);
            xmlType.setSimpleType(false);
            if (this.outputParameter != null) {
                if (!this.outputParameter.isSchemaGenerated()){
                    this.outputParameter.generateSchema(configurator,schemaMap);
                }
                xmlType.addElement(this.outputParameter.getElement());
                QName elementTypeQName = this.outputParameter.getElement().getType().getQname();
                if (!xmlSchema.containsNamespace(elementTypeQName.getNamespaceURI())) {
                    // if the element namespace does not exists we have to add it
                    if (!elementTypeQName.getNamespaceURI().equals(Constants.URI_2001_SCHEMA_XSD)) {
                        XmlImport xmlImport = new XmlImport(elementTypeQName.getNamespaceURI());
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.