Examples of Outputter


Examples of com.uic.ase.proj.xbn.output.Outputter

   **/
  public TemplateDataOrString(String s_name, ForLineRetrieval for_lineRetrieval, TParseConfig tp_config) throws TemplateFormatException  {
    throwAXIfNull(for_lineRetrieval, "for_lineRetrieval", sCNSTR);
    throwAXIfNull(tp_config, "tp_config", sCNSTR);
    sName = s_name;
    Outputter optr_dbg = tp_config.getOptrDebug();

    if(optr_dbg.isOn())  {
      optr_dbg.write("TemplateDataOrString:  Parsing...START");
      optr_dbg.write("\tTemplate name:           '" + getName() + "'");
      optr_dbg.write("[" + tp_config.toString() + "]");
    }

    VWString acsSurroundingText = new VWString();
    StringBuffer sbCurrentSurrText = new StringBuffer(sES);
    AOSLCreator aoslc = new AOSLCreator();

    TLAObjects tlao = new TLAObjects(tp_config);

    while(for_lineRetrieval.hasMoreLines())  {
      StringBuffer sbLine = for_lineRetrieval.getNextLine();
      TemplateLineAnalyzer tla = new TemplateLineAnalyzer(getName(), for_lineRetrieval.getLineNumberPrev(), sbLine, tlao);

      String sFinalSurrTxt = null;
      while(!tla.isDoneAnalyzing())  {
        if(tla.hasAnotherGap())  {
          s_s ss = tla.getNextSurrTxtAndGap();

          if(!tp_config.doIgnoreSurrTxt())  {
            sbCurrentSurrText.append(ss.s1);
            addCurrSurrTextOntoArray(acsSurroundingText, sbCurrentSurrText);
          }

          aoslc.addString(ss.s2);

          if(aoslc.wasLastStringUnique())  {
            //THIS IS PRINTING OUT AFTER THE GAP *FOLLOWING*
            //THE ONE THAT IS UNIQUE.  HMMMMM.
            optr_dbg.write("\t\t\t[ UNIQUE ]");
          }

        }  else  {
          //The end of the line has been reached.  Get the final
          //surrounding text.
          sFinalSurrTxt = tla.getFinalSurrTxt();

        }
      }

      if(!tp_config.doIgnoreSurrTxt())  {
        sbCurrentSurrText.append(sFinalSurrTxt);
      }
    }

    if(aoslc.getCountUnq() < 1)  {
      //There are no gaps, so the FLR contains a plain string.
      sString = sbCurrentSurrText.toString();
      tData = null;

      optr_dbg.write("No gaps found.  isTemplate() equals false.  Use getString().");

    else  {
      //There is at least one gap.  Add the final surrounding
      //text to the array.
      if(!tp_config.doIgnoreSurrTxt())  {
        addCurrSurrTextOntoArray(acsSurroundingText, sbCurrentSurrText);
      }

      sString = null;

      aoslc.lock();
      tData = new TemplateData(getName(),
        aoslc.getAOSLookup(),
        new APString(acsSurroundingText.getAOString()),
        tlao.sTagStart, tlao.sTagEnd);

      sName = null;

      if(optr_dbg.isOn())  {
        optr_dbg.write(tData.getAOSLookup().getUSAPUnique().getLength() + " unique gaps found.  isTemplate() equals true.  Use getTemplateData().");
      }
    }

    optr_dbg.write("TemplateDataOrString:  Parsing...END");
  }
View Full Code Here

Examples of com.uic.ase.proj.xbn.output.Outputter

    if(msg_format == null)  {
      throwAX(s_callingClsFnc + ":  msg_format is null.");
    }

    if(!o_writer.isActive())  {
      return (new Outputter());
    }

    return (new Outputter(o_writer, (new OConfig(msg_format, true))));
  }
View Full Code Here

Examples of com.uic.ase.proj.xbn.output.Outputter

    <P>Get the VWObject containing all configuration variables read in from the source text.</P>

    @return  <CODE><A HREF="~JD~getVWObject(flr,crc,optr)~EJD~">getVWObject</A>(for_lineRetrieval, cr_config, (new <A HREF="~JD~optr#optr()~EJD~">Outputter</A>()))</CODE>
   **/
  public VWObject getVWObject(ForLineRetrieval for_lineRetrieval, CRConfig cr_config) throws ConfigFormatException  {
    return getVWObject(for_lineRetrieval, cr_config, (new Outputter()));
  }
View Full Code Here

Examples of com.uic.ase.proj.xbn.output.Outputter

    <P>Get the VWObject containing all configuration variables read in from the source text.</P>

    @return  <CODE><A HREF="~JD~getVWObject(flr,crc,optr,vwo,crf)~EJD~">getVWObject</A>(for_lineRetrieval, cr_config, (new <A HREF="~JD~optr#optr()~EJD~">Outputter</A>()), acoSbsbc_cfgVars, cr_filter)</CODE>
   **/
  public VWObject getVWObject(ForLineRetrieval for_lineRetrieval, CRConfig cr_config, VWObject acoSbsbc_cfgVars, CRFilter cr_filter) throws ConfigFormatException  {
    return getVWObject(for_lineRetrieval, cr_config, (new Outputter()), acoSbsbc_cfgVars, cr_filter);
  }
View Full Code Here

Examples of com.uic.ase.proj.xbn.output.Outputter

        "\nFor documentation on many of these parameters, see the documentation for Utility.getPackageDependencies().",
        true);

      CommandLine cl = ucl.getCommandLine(as_cmdLineParams);

      Outputter optrDbg = ucl.getOSDOOrOSDOAndFile("dbgfile", false);
      String sOutputFile = cl.getOptionValue("outfile");
      String sDirToAnalyze = cl.getOptionValue("dir2nlz");
      int iSubDirLevels = ucl.getInt("subdirlvls", -1);
      String sTmplDir = cl.getOptionValue("tmpldir");
      String sPkgPrefixes = cl.getOptionValue("pkgprfxs");
    //Prepare for testing and get command line parameters...END

    if(iSubDirLevels == 0)  {
      throwAXS(sAXS_PRE + "SUB_DIR_LEVELS (" + iSubDirLevels + ") must equal -1, or be greater than zero.");
    }

    String[] asPkgPrefixes = null;
    if(!sPkgPrefixes.equals(sZERO))  {
      StringTokenizer stPkgPrefixes = new StringTokenizer(sPkgPrefixes, "/");
      asPkgPrefixes = new String[stPkgPrefixes.countTokens()];
      for(int i = 0; i < asPkgPrefixes.length; i++)  {
        asPkgPrefixes[i] = stPkgPrefixes.nextToken();
      }
    }

    optrDbg.write("Reporting all dependencies...START");

    TOGOne tog1Overall = null;
    TOGThree tog3Pkg = null;
    TOGOne tog1DOSection = null;
    TOGOne tog1DOSRow = null;
    TOGOne tog1DOBSection = null;
    TOGOne tog1DOBSRow = null;
    String sDOSctnNothing = null;
    String sDOBSctnNothing = null;
    String sDOSRNewline = null;
    String sDOBSRNewline = null;


    if(sTmplDir.equals(sZERO))  {
      optrDbg.write("No templates supplied.  Will output plain text only...");
    else  {
      optrDbg.write("Templates exist in '" + sTmplDir + "'.  Loading...");

      SOBStringBuffer ssb = new SOBStringBuffer(sES);
      util.appendFileText(ssb, sTmplDir + sTMPL_DOS_NOTHING);
      sDOSctnNothing = ssb.toString();

      ssb.deleteAll();
      util.appendFileText(ssb, sTmplDir + sTMPL_DOBS_NOTHING);
      sDOBSctnNothing = ssb.toString();

      ssb.deleteAll();
      util.appendFileText(ssb, sTmplDir + sTMPL_DOS_ROW_NEWLINE);
      sDOSRNewline = ssb.toString();

      ssb.deleteAll();
      util.appendFileText(ssb, sTmplDir + sTMPL_DOBS_ROW_NEWLINE);
      sDOBSRNewline = ssb.toString();

      try  {
        tog3Pkg = (new GetTOG3FFile(
          sTmplDir + sTMPL_PACKAGE,
          sTMPL_PKG_package_name,
          sTMPL_PKG_depends_on_section,
          sTMPL_PKG_depended_on_by_section,
          optrDbg)).getTOGThree();
      catch(AssertException ax)  {
        String sErr = sAXS_PRE + "Attempting to load " + sTMPL_PACKAGE + ".  " + ax.toString();
        optrDbg.write(sErr);
        throwAXS(sErr);
      }

      tog1Overall = getTOG1FFile(sTmplDir + sTMPL_OVERALL, sTMPL_PKG_all_dependency_lists, optrDbg);
      tog1DOSection = getTOG1FFile(sTmplDir + sTMPL_DEPENDS_ON_SCTN, sTMPL_DOS_all_depends_on_rows, optrDbg);
      tog1DOSRow = getTOG1FFile(sTmplDir + sTMPL_DOS_ROW, sTMPL_DOSR_package_name, optrDbg);
      tog1DOBSection = getTOG1FFile(sTmplDir + sTMPL_DEPENDED_ON_BY_SCTN, sTMPL_DOBS_all_depended_on_by_rows, optrDbg);
      tog1DOBSRow = getTOG1FFile(sTmplDir + sTMPL_DOBS_ROW, sTMPL_DOBSR_package_name, optrDbg);
    }

    optrDbg.write("...SUCCESS:  Templates loaded.");
    Outputter optrOutput = null;
    if(sOutputFile.equals(sZERO))  {
      //Output will only go to screen.
      optrDbg.write("Outputting to screen (and file, if debugging output goes there, too)...");
      optrOutput = optrDbg;
    else  {
      optrDbg.write("Outputting to '" + sOutputFile + "'...");
      optrOutput = new Outputter(new OWFile(sOutputFile, false));
    }

    s_acs_acs[] aSacsacs = util.getPackageDependencies(sDirToAnalyze, iSubDirLevels, optrDbg, asPkgPrefixes, true, null);

    optrDbg.write("Reporting all dependencies...START");
    if(sTmplDir.equals(sZERO))  {
      optrDbg.write("No templates supplied.  Outputting text only...");
      for(int i = 0; i < aSacsacs.length; i++)  {
        optrDbg.write(aSacsacs[i].s + "\n   Depends on:");
        for(int j = 0; j < aSacsacs[i].acs1.size(); j++)  {
          optrDbg.write("      " + aSacsacs[i].acs1.getString(j));
        }

        optrDbg.write("   Depended on by:");
        for(int j = 0; j < aSacsacs[i].acs2.size(); j++)  {
          optrDbg.write("      " + aSacsacs[i].acs2.getString(j));
        }
      }

    }  else  {
      optrDbg.write("Templates exist in '" + sTmplDir + "'");

      TemplateFiller tf = new TemplateFiller(false);
      StringBuffer sbAllPackageLists = new StringBuffer(sES);

      for(int i = 0; i < aSacsacs.length; i++)  {
        String sDOSection = getSection(tf, aSacsacs[i].acs1,
          tog1DOSection, sTMPL_DOS_all_depends_on_rows,
          tog1DOSRow, sTMPL_DOSR_package_name,
          sDOSRNewline, sDOSctnNothing);

        String sDOBSection = getSection(tf, aSacsacs[i].acs2,
          tog1DOBSection, sTMPL_DOBS_all_depended_on_by_rows,
          tog1DOBSRow, sTMPL_DOBSR_package_name,
          sDOBSRNewline, sDOBSctnNothing);

        tf.setTemplate(tog3Pkg);
        tf.fill(sTMPL_PKG_package_name, aSacsacs[i].s);
        tf.fill(sTMPL_PKG_depends_on_section, sDOSection);
        tf.fill(sTMPL_PKG_depended_on_by_section, sDOBSection);
        sbAllPackageLists.append(tf.getResult());
      }

      tf.setOWriter(optrOutput.getOWriter());
      tf.setTemplate(tog1Overall);
      tf.fill(sTMPL_PKG_all_dependency_lists, sbAllPackageLists.toString());

      optrDbg.write("Output exists in '" + sOutputFile + "'...");
    }
View Full Code Here

Examples of com.uic.ase.proj.xbn.output.Outputter

    @return  If <CODE><a href="#getCommandLine()">getCommandLine</a>().<A HREF="~JD~clicl#hasOption(s)~EJD~">hasOption</A>(s_optionName)</CODE>:  <CODE>new <A HREF="~JD~optr#optr(ow)~EJD~">Outputter</A>(new <A HREF="~JD~owsdoaf#owsdoaf(s,b)~EJD~">OWSDOAndFile</A>(getCommandLine().<A HREF="~JD~clicl#getOptionValue(s)~EJD~">getOptionValue</A>(s_optionName), b_appendToFile))</CODE>
    <BR>Otherwise, return <CODE>new <A HREF="~JD~osdo#osdo()~EJD~">OSysDotOut</A>()</CODE>
   **/
  public final Outputter getOSDOOrOSDOAndFile(String s_optionName, boolean b_appendToFile)  {
    if(getCommandLine().hasOption(s_optionName))  {
      return new Outputter(new OWSDOAndFile(getCommandLine().getOptionValue(s_optionName), b_appendToFile));
    else  {
      return new OSysDotOut();
    }
  }
View Full Code Here

Examples of com.uic.ase.proj.xbn.output.Outputter

      boolean bReportAllSCLs = cl.hasOption("scl");
      String sSourceCodeBaseDir = cl.getOptionValue("srcbase", null);
      String sRelUrlJDToSourceBases = cl.getOptionValue("rujd2sib");
      boolean bPrintXOnTheFly = cl.hasOption("xotf");
      boolean bVerifyLinkTargetsExist = cl.hasOption("vltx");
      Outputter optr = ucl.getOSDOOrOSDOAndFile("outfile", false);
      String sDirToAnalyze = cl.getOptionValue("dir2nlz");
      String sPkgPrefix = cl.getOptionValue("pkgpref", null);
    //Prepare, set and get command line parameters...END

    (new UtilJDLCode()).reportJDLinkCodeErrors(sDocletClassMap, sDirToAnalyze, bAnalyzeJDLCs, sSourceCodeBaseDir, sRelUrlJDToSourceBases, bReportAllSCLs, bVerifyLinkTargetsExist, bPrintXOnTheFly, sPkgPrefix, optr.getOWriter());

    if(cl.hasOption("outfile"))  {
      optr.write("\n\nOutput written to '" + ((OWFile)optr.getOWriter()).getPath() + "'");
    }

    optr.write("ReportBadJDLinkCodes...END");
  }
View Full Code Here

Examples of com.uic.ase.proj.xbn.output.Outputter

        return false;
      }
    }

    Outputter optr = new Outputter(ow_output, new OConfig(true));

    final String sDASHES = "----------------------";

    optr.write(sLS + sLS + sDASHES + sLS + "LOADING CODE FILES..." + sLS + sDASHES + sLS);

    optr.write(sLS + sDASHES);

    optr.getOConfig().getMsgFormat().setIndent("\t");
    DirFile df = new DirFile(s_dirToAnalyze, -1, (new FFJavaAndSummary()), optr);
    optr.getOConfig().getMsgFormat().setIndent(null);

    optr.write("...SUCCESS" + sLS + sDASHES + sLS + "STARTING ANALYSIS..." + sLS + sDASHES + sLS);

    JDCArray jdca = null;
    if(b_analyzeJDLCodes)  {
      optr.write("Loading doclet class map:  '" + s_docletClassMapFile + "'...");
      jdca = getJDCAFromMapFile(s_docletClassMapFile);
      optr.write("...SUCCESS");
    }

    StringBuffer sbSCLReport = null;
    if(b_listAllSCLs)  {
      sbSCLReport = new StringBuffer(sES);
    }

    optr.write("   df.toString()=" + df.toString());

      StringBuffer sbErrors = new StringBuffer(sES);
      VWString vws = new VWString();

      optr.getOConfig().getMsgFormat().setIndent("\t");
      int iErrors = actuallyReport(df, b_printXOnTheFly, sbErrors, jdca, b_cibJDLCTarget, false, optr, vws, s_pkgPrefix, s_sourceCodeBaseDir, s_relUrlJDToCodeBases, sbSCLReport);
      optr.getOConfig().getMsgFormat().setIndent(null);

    if(sbSCLReport != null  &&  sbSCLReport.length() > 0)  {
      optr.write(sLS + sLS + "----------------  START REPORT:  All source-code links  ----------------" + sLS + sLS + sbSCLReport.toString() + sLS + sLS + "----------------  END REPORT:  All source-code links  ----------------");
    }

    if(sbErrors.length() > 0)  {
      optr.write(sLS + sLS + "----------------  START REPORT:  Javadoc Link Errors  ----------------" + sLS + sLS + sbErrors.toString() + sLS + sLS + "----------------   END REPORT:  Javadoc Link Errors  ----------------" + sLS + sLS + "STATISTICS:" + sLS + "   Unique JavaDoc Link Codes:    " + iUniqueJDLCs + sLS + "   Absolute JavaDoc Link Codes:  " + iAbsoluteJDLCs + sLS + "   Total errors:                 " + iErrors + sLS + "   Total files analyzed:         " + iFiles + sLS + "   Average errors per file:      " + ((new Double(iErrors)).doubleValue()/(new Double(iFiles)).doubleValue()) + sLS + sLS);

    else  {
      optr.write(sLS + sLS + sLS + sLS + "  NO ERRORS.  Yay.  :'  )" + sLS + sLS + sLS);
    }
  }
View Full Code Here

Examples of com.uic.ase.proj.xbn.output.Outputter

        try  {
          i_i ii = uTemplate.addUnqGapNamesToACS(acs_uniqueGapNames,
            flrJDLC,
            new GapConfig(getJDLinkGapTextStart(), getJDLinkGapTextEnd()),
            (new Outputter()));

          iUniqueJDLCs += ii.i1;
          iAbsoluteJDLCs += ii.i2;

        catch(AssertException ax)  {
View Full Code Here

Examples of com.uic.ase.proj.xbn.output.Outputter

    <P>Create a GetTOG3FString.</P>

    <P>Equal to <CODE><A HREF="~JD~gtog3fs#gtog3fs(s,s,ogc3,gc,optr)~EJD~">GetTOG3FString</A>(s_templateName, s_srcTxt, ogc_three, gap_config)</CODE></P>
   **/
  public GetTOG3FString(String s_templateName, String s_srcTxt, OGCThree ogc_three, GapConfig gap_config)  {
    this(s_templateName, s_srcTxt, ogc_three, gap_config, (new Outputter()));
  }
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.