Examples of XmlImport


Examples of de.timefinder.core.io.xml.XmlImport

        super.setUp();
    }

    @Test
    public void testMain() throws Exception {
        new XmlImport(dataPool, settings, new FileInputStream(new File("/home/peterk/.timefinder/storage.xml"))).doWork();
        WorkloadOverviewCommand command = new WorkloadOverviewCommand();
        command.setSettings(settings);
        command.setDataPool(dataPool);
//        command.doOnce();
    }
View Full Code Here

Examples of de.timefinder.core.io.xml.XmlImport

            @Override
            protected void myconstruct() throws Exception {
                bar.getProgressMonitor().worked(10);

                XmlImport importer = new XmlImport(dataPool, settings,
                        new FileInputStream(file.getAbsolutePath()));

                // TODO NOW
//                importer.setStatusBar(bar);

                importer.doWork();
                bar.getProgressMonitor().worked(90);
            }

            @Override
            protected void done() {
View Full Code Here

Examples of de.timefinder.core.io.xml.XmlImport

            }
            return;
        }

        try {
            new XmlImport(dataPool, dataSettings, new FileInputStream(storageFile)).doWork();
        } catch (IOException ex) {
            logger.fatal("Couldn't auto-import from:" + storageFile, ex);
        }
    }
View Full Code Here

Examples of edu.isi.karma.imp.json.XMLImport

  }

    @Override
    protected Import createImport(Workspace workspace) {
      JSONArray tree = generateSelectTree(columnsJson, true);
        return new XMLImport(getFile(), getFile().getName(), workspace, encoding, maxNumLines, tree);
    }
View Full Code Here

Examples of edu.isi.karma.imp.json.XMLImport

        return new XMLImport(getFile(), getFile().getName(), workspace, encoding, maxNumLines, tree);
    }
   
    @Override
    protected Import createImport(Workspace workspace, int sampleSize) {
        return new XMLImport(getFile(), getFile().getName(), workspace, encoding, sampleSize, null);
    }
View Full Code Here

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

                this.xmlType.setParentType(parentType.getXmlType());
                // import the complex type namespace if needed.
                if (!xmlSchema.containsNamespace(this.xmlType.getParentType().getQname().getNamespaceURI())){
                    // if the element namespace does not exists we have to add it
                    if (!this.xmlType.getParentType().getQname().getNamespaceURI().equals(Constants.URI_2001_SCHEMA_XSD)) {
                        XmlImport xmlImport = new XmlImport(this.xmlType.getParentType().getQname().getNamespaceURI());
                        xmlSchema.addImport(xmlImport);
                    }
                    xmlSchema.addNamespace(this.xmlType.getParentType().getQname().getNamespaceURI());
                }

            }

            // add elements of the elementFields
            ElementField elementField;
            for (Iterator iter = this.elementFields.iterator();iter.hasNext();){
                elementField = (ElementField) iter.next();
                if (!elementField.isSchemaGenerated()){
                    // if it is not already processed process it.
                    elementField.generateSchema(configurator,schemaMap);
                }
                this.xmlType.addElement(elementField.getElement());
                // we have to set the namespaces of these element complex types properly
                QName elementTypeQName = elementField.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());
                }

            }

            //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);
                    }
                    xmlSchema.addNamespace(attributeTypeQName.getNamespaceURI());
                }
View Full Code Here

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

                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());
                        xmlSchema.addImport(xmlImport);
                    }
                    xmlSchema.addNamespace(elementTypeQName.getNamespaceURI());
                }
            }
View Full Code Here

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

                schemaMap.put(elementTypeQName.getNamespaceURI(), new XmlSchema(elementTypeQName.getNamespaceURI()));
            }
            XmlSchema xmlSchema = (XmlSchema) schemaMap.get(elementTypeQName.getNamespaceURI());
            if (!xmlSchema.containsNamespace(elementTypeQName.getNamespaceURI())) {
                if (!elementTypeQName.getNamespaceURI().equals(Constants.URI_2001_SCHEMA_XSD)) {
                    XmlImport xmlImport = new XmlImport(elementTypeQName.getNamespaceURI());
                    xmlSchema.addImport(xmlImport);
                }
                xmlSchema.addNamespace(elementTypeQName.getNamespaceURI());
            }
            parameter.getElement().setTopElement(true);
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.