Examples of CreateXMLFile


Examples of cn.baiweigang.qtaf.dispatch.testcase.CreateXmlFile

   * 构造函数
   */
  public   IftDataFileCase() {
    super();
    createJavaFile = new CreateJavaFile();
    createXmlFile = new CreateXmlFile();
    setIftTaskName("未命名测试任务");
    excelReportName="未命名接口测试";
  }
View Full Code Here

Examples of org.apache.derby.impl.tools.planexporter.CreateXMLFile

     * @throws IOException if an error occurs when writing the XML file
     */
    private static void generateXML(AccessDatabase access,
            String arg, String stmt, String time, String xsl)
            throws IOException {
        CreateXMLFile xmlFile = new CreateXMLFile(access);

        final String fileName = arg.toUpperCase().endsWith(".XML")
                                ? arg : (arg + ".xml");

        Writer out;
        try {
            out = AccessController.doPrivileged(
                    new PrivilegedExceptionAction<Writer>() {
                @Override
                public Writer run() throws IOException {
                    return new OutputStreamWriter(
                            new FileOutputStream(fileName), "UTF-8");
                }
            });
        } catch (PrivilegedActionException pae) {
            throw (IOException) pae.getCause();
        }

        try {
            xmlFile.writeTheXMLFile(stmt, time, out, xsl);
        } finally {
            out.close();
        }
    }
View Full Code Here

Examples of org.apache.derby.impl.tools.planexporter.CreateXMLFile

          new AccessDatabase(s.getConnection(), "XPLTEST", stmt_id);
        if(access.initializeDataArray()){
          access.createXMLFragment();
          access.markTheDepth();

          CreateXMLFile xml_file = new CreateXMLFile(access);
          xml_file.writeTheXMLFile(
              access.statement(),
              access.time(),
              access.getData(),
              SupportFilesSetup.getReadWriteURL(stmt_id + ".xml")
              .getPath(),
View Full Code Here

Examples of org.apache.derby.impl.tools.planexporter.CreateXMLFile

    public void testPlanExporterIllegalFileAccess()
  throws Exception
    {
  AccessDatabase access =
        new AccessDatabase(getConnection(), "NoSuchSchema", "nostmt");
      CreateXMLFile xml_file = new CreateXMLFile(access);
  try
  {
        xml_file.writeTheXMLFile("nostmt", "notime", null,
      "/illegal.xml", null);
    fail("Expected exception for illegal file access");
  }
  catch (java.security.AccessControlException ace)
  {
View Full Code Here

Examples of org.apache.derby.impl.tools.planexporter.CreateXMLFile

        AccessDatabase access =
                new AccessDatabase(getConnection(), schema, stmtId);
        assertTrue(access.initializeDataArray());
        access.createXMLFragment();
        access.markTheDepth();
        CreateXMLFile create = new CreateXMLFile(access);
        create.writeTheXMLFile(
                access.statement(),
                access.time(),
                access.getData(),
                SupportFilesSetup.getReadWriteURL(stmtId + ".xml").getPath(),
                null);
View Full Code Here

Examples of org.apache.derby.impl.tools.planexporter.CreateXMLFile

          new AccessDatabase(s.getConnection(), "XPLTEST", stmt_id);
        if(access.initializeDataArray()){
          access.createXMLFragment();
          access.markTheDepth();

          CreateXMLFile xml_file = new CreateXMLFile(access);
          xml_file.writeTheXMLFile(
              access.statement(),
              access.time(),
              access.getData(),
              SupportFilesSetup.getReadWriteURL(stmt_id + ".xml")
              .getPath(),
View Full Code Here

Examples of org.apache.derby.impl.tools.planexporter.CreateXMLFile

    public void testPlanExporterIllegalFileAccess()
  throws Exception
    {
  AccessDatabase access =
        new AccessDatabase(getConnection(), "NoSuchSchema", "nostmt");
      CreateXMLFile xml_file = new CreateXMLFile(access);
  try
  {
        xml_file.writeTheXMLFile("nostmt", "notime", null,
      "/illegal.xml", null);
    fail("Expected exception for illegal file access");
  }
  catch (java.security.AccessControlException ace)
  {
View Full Code Here

Examples of org.apache.derby.impl.tools.planexporter.CreateXMLFile

        AccessDatabase access =
                new AccessDatabase(getConnection(), schema, stmtId);
        assertTrue(access.initializeDataArray());
        access.createXMLFragment();
        access.markTheDepth();
        CreateXMLFile create = new CreateXMLFile(access);
        create.writeTheXMLFile(
                access.statement(),
                access.time(),
                access.getData(),
                SupportFilesSetup.getReadWriteURL(stmtId + ".xml").getPath(),
                null);
View Full Code Here

Examples of org.apache.derby.impl.tools.planexporter.CreateXMLFile

     * @param xsl name of the style sheet
     * @throws Exception
     */
    private static void generateXML(AccessDatabase access,
            String arg, String stmt, String time, String xsl) throws Exception{
        CreateXMLFile xmlFile = new CreateXMLFile(access);

        if(arg.toUpperCase().endsWith(".XML")){
            xmlFile.writeTheXMLFile(stmt, time,
                    access.getData(),
                    arg, xsl);
        }
        else{
            xmlFile.writeTheXMLFile(stmt, time,
                    access.getData(),
                    arg.concat(".xml"),
                    xsl);
        }
    }
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.