Package com.uic.ase.proj.xbn.string

Examples of com.uic.ase.proj.xbn.string.SOBStringBuffer


    <P>Get the relative url from one html file to another.  This is only a link from one file to another, not to a location within the file.</P>

    @return  The contents of the <A HREF="~JD~ssb~EJD~">SOBStringBuffer</A>:  <CODE><A HREF="~JD~appendRelUrlToFile(sob,jdf,jdc)~EJD~">appendRelUrlToFile</A>((new SOBStringBuffer("")), jdf_linkSource, jdc_toLinkTo)</CODE>
   **/
  public final String getRelUrlToFile(JDFile jdf_linkSource, JDClass jdc_toLinkTo)  {
    SOBStringBuffer ssb = new SOBStringBuffer(sES);
    appendRelUrlToFile(ssb, jdf_linkSource, jdc_toLinkTo);
    return ssb.toString();
  }
View Full Code Here


    <P>Get a copy of the string where the relative url (to the class-dot-function or constructor or local function), as defined by the parts existing in this SplitLinkCode, is appended.</P>

    @return  The contents of getSOBSB:  <CODE><A HREF="~JD~appendRelUrl(slc,sob,jdf,jdca,b,b)~EJD~">appendRelUrl</A>(split_linkCode, [<A HREF="~JD~utilsb~EJD~">UtilString</A>].<a href="~JD~utils#getSOBSB(s,s)~EJD~">getSOBSB</a>(s_tr, <A HREF="#sUD">sUD</A> + "getRelUrlAppended"), jdf_linkSource, jdc_array, b_crashIfBadTarget, b_ignoreIndirectJDLCs))</CODE>
   **/
  public final String getRelUrlAppended(SplitLinkCode split_linkCode, String s_tr, JDFile jdf_linkSource, JDCArray jdc_array, boolean b_crashIfBadTarget, boolean b_ignoreIndirectJDLCs)  {
    SOBStringBuffer ssb = uStr.getSOBSB(s_tr, sUD + "getRelUrlAppended");
    appendRelUrl(split_linkCode, ssb, jdf_linkSource, jdc_array, b_crashIfBadTarget, b_ignoreIndirectJDLCs);
    return ssb.toString();
  }
View Full Code Here

    <P>Get a copy of the StringBuffer where the relative url (to the class-dot-function or constructor or local function), as defined by the parts existing in this SplitLinkCode, is appended.</P>

    @return  The contents of getSOBSB:  <CODE><A HREF="~JD~appendRelUrl(slc,sob,jdf,jdca,b,b)~EJD~">appendRelUrl</A>(split_linkCode, [<A HREF="~JD~utilsb~EJD~">UtilStringBuffer</A>].<a href="~JD~utilsb#getSOBSB(sb,s)~EJD~">getSOBSB</a>(str_buffer, <A HREF="#sUD">sUD</A> + "getRelUrlAppended"), jdf_linkSource, jdc_array, b_crashIfBadTarget, b_ignoreIndirectJDLCs))</CODE>
   **/
  public final StringBuffer getRelUrlAppended(SplitLinkCode split_linkCode, StringBuffer str_buffer, JDFile jdf_linkSource, JDCArray jdc_array, boolean b_crashIfBadTarget, boolean b_ignoreIndirectJDLCs)  {
    SOBStringBuffer ssb = uSB.getSOBSB(str_buffer, sUD + "getRelUrlAppended");
    appendRelUrl(split_linkCode, ssb, jdf_linkSource, jdc_array, b_crashIfBadTarget, b_ignoreIndirectJDLCs);
    return ssb.getStringBuffer();
  }
View Full Code Here

    <P>Get a copy of the StringOrBuffer (as an SOBStringBuffer) where the relative url (to the class-dot-function or constructor or local function), as defined by the parts existing in this SplitLinkCode, is appended.</P>

    @return  The contents of getSOBSB:  <CODE><A HREF="~JD~appendRelUrl(slc,sob,jdf,jdca,b,b)~EJD~">appendRelUrl</A>(split_linkCode, [<A HREF="~JD~utilsob~EJD~">UtilSOB</A>].<a href="~JD~utilsob#getSOBSB(sob,s)~EJD~">getSOBSB</a>(str_orBfr, <A HREF="#sUD">sUD</A> + "getRelUrlAppended"), jdf_linkSource, jdc_array, b_crashIfBadTarget, b_ignoreIndirectJDLCs))</CODE>
   **/
  public final SOBStringBuffer getRelUrlAppended(SplitLinkCode split_linkCode, StringOrBuffer str_orBfr, JDFile jdf_linkSource, JDCArray jdc_array, boolean b_crashIfBadTarget, boolean b_ignoreIndirectJDLCs)  {
    SOBStringBuffer ssb = uSOB.getSOBSB(str_orBfr, sUD + "getRelUrlAppended");
    appendRelUrl(split_linkCode, ssb, jdf_linkSource, jdc_array, b_crashIfBadTarget, b_ignoreIndirectJDLCs);
    return ssb;
  }
View Full Code Here

      if(s_sourceCodeBaseDir != null)  {
        //Analyze source-code links.

        while(flrSCL.hasMoreLines())  {
          SOBStringBuffer ssb = new SOBStringBuffer(flrSCL.getNextLine());

          int iDeletedChars = 0;
          int iLink = 0;
          while(iLink != -1)  {
            iLink = ssb.indexOf(s_relUrlJDToCodeBases);
            if(iLink == -1)  {
              continue;
            }

            String sOrigLink = uSOB.getStringAround(ssb, iLink, "\"", "\"", false, false);
            SOBStringBuffer ssbLink = new SOBStringBuffer(sOrigLink);

            ssb.delete(0, uSOB.getGSAInfo().i4);
            iDeletedChars += uSOB.getGSAInfo().i4;

            //Delete as many "../" as there are directory
            //parts in jdf_linkSource.

            try  {
              int iDirParts = jdfLinkSource.getPartCount() - 1;
              while(iDirParts > 0)  {
                int iFound = (jdfLinkSource.getPartCount() - 1 - iDirParts);
                if(ssbLink.startsWith(s_relUrlJDToCodeBases||  !ssbLink.startsWith("../"))  {
                  throwAX("It is expected that the source-code link starts with " + (jdfLinkSource.getPartCount() - 1) + " instances of '../', followed by s_relUrlJDToCodeBases ('" + s_relUrlJDToCodeBases + "').  " + iFound + " initial '../' " + (iFound==1?"was":"were") + " actually found.");
                }

                ssbLink.delete(0, 3);
                iDirParts--;
              }

              //Now the relative link from the javadoc and
              //source-code base directories must exist at
              //the beginning of what remains.

              if(!ssbLink.startsWith(s_relUrlJDToCodeBases))  {
                int iFound = jdfLinkSource.getPartCount() - 1;

                while(ssbLink.startsWith("../"&&
                      !ssbLink.startsWith(s_relUrlJDToCodeBases))  {
                  iFound++;
                  ssbLink.delete(0, 3);
                }

                if(iFound > (jdfLinkSource.getPartCount() - 1))  {
                  throwAX("It is expected that the source-code link starts with " + (jdfLinkSource.getPartCount() - 1) + " instances of '../', followed by s_relUrlJDToCodeBases ('" + s_relUrlJDToCodeBases + "').  " + iFound + " initial '../' " + (iFound==1?"was":"were") + " actually found.");
                }
                throwAX("It is expected that the source-code link starts with " + (jdfLinkSource.getPartCount() - 1) + " instances of '../', followed by s_relUrlJDToCodeBases ('" + s_relUrlJDToCodeBases + "').  The correct amount of '../' were found, but s_relUrlJDToCodeBases does not exist after them.");
              }

              //It does exist.  Delete it.

              ssbLink.delete(0, s_relUrlJDToCodeBases.length());

              //Now, what remains must be a file that
              //actually exists within s_sourceCodeBaseDir.

              if(sb_sclReport != null)  {
                if(!sPreviousFileSCLR.equals(sCurrentFileSCLR))  {
                  sb_sclReport.append(sLS + jdfLinkSource.getList(sPD) + sLS);
                }
                sPreviousFileSCLR = sCurrentFileSCLR;

                sb_sclReport.append("   " + ssbLink.toString() + sLS);
              }

              if(!sSLASH.equals(File.separator))  {
                uSOB.replaceAll(ssbLink, sSLASH, File.separator);
              }

              File f = new File(s_sourceCodeBaseDir + ssbLink.toString());

              if(!f.exists())  {
                throwAX("The target does not exist:  '" + f.getPath() + "'.");
              }
View Full Code Here

    @param  s_callingClsFnc  The function from which the potential error message should appear as if it is coming from.
    @return  <CODE>(new <A HREF="~JD~ssb#ssb(s)~EJD~">SOBStringBuffer</A>(s_tr))</CODE>
   **/
  public final SOBStringBuffer getSOBSB(String s_tr, String s_sDescription, String s_callingClsFnc)  {
    try  {
      return (new SOBStringBuffer(s_tr));
    catch(NullPointerException npx)  {
      throwAX(s_callingClsFnc + ":  " + s_sDescription + " is null.");
    }

    //Never reached.  Required for compile.
View Full Code Here

    for(int i = 0; i < a_string.length; i++)  {
      if(a_string[i] == null)  {
        assb[i] = null;

      else  {
        assb[i] = new SOBStringBuffer(a_string[i]);
      }
    }

    return assb;
  }
View Full Code Here

    <P>Get a copy of the StringOrBuffer (as an SOBStringBuffer) where each line is quoted.</P>

    @return  The contents of getSOBSB:  <CODE><A HREF="~JD~quoteLines(sob)~EJD~">quoteLines</A>(<A HREF="~JD~getSOBSB(sob,s)~EJD~">getSOBSB</A>(str_orBfr, "getQuotedLines"))</CODE>
   **/
  public final StringOrBuffer getQuotedLines(StringOrBuffer str_orBfr)  {
    SOBStringBuffer ssb = getSOBSB(str_orBfr, sGQL);
    quoteLines(ssb);
    return ssb;
  }
View Full Code Here

    <P>Get a copy of the StringOrBuffer (as an SOBStringBuffer) where each line is quoted.</P>

    @return  The contents of getSOBSB:  <CODE><A HREF="~JD~quoteLines(sob,s)~EJD~">quoteLines</A>(<A HREF="~JD~getSOBSB(sob,s)~EJD~">getSOBSB</A>(str_orBfr, "getQuotedLines"), s_quote)</CODE>
   **/
  public final StringOrBuffer getQuotedLines(StringOrBuffer str_orBfr, String s_quote)  {
    SOBStringBuffer ssb = getSOBSB(str_orBfr, sGQL);
    quoteLines(ssb, s_quote);
    return ssb;
  }
View Full Code Here

    <P>Get a copy of the StringOrBuffer (as an SOBStringBuffer) where each line is quoted.</P>

    @return  The contents of getSOBSB:  <CODE><A HREF="~JD~quoteLines(sob,s,s)~EJD~">quoteLines</A>(<A HREF="~JD~getSOBSB(sob,s)~EJD~">getSOBSB</A>(str_orBfr, "getQuotedLines"), s_quoteStart, s_quoteEnd)</CODE>
   **/
  public final StringOrBuffer getQuotedLines(StringOrBuffer str_orBfr, String s_quoteStart, String s_quoteEnd)  {
    SOBStringBuffer ssb = getSOBSB(str_orBfr, sGQL);
    quoteLines(ssb, s_quoteStart, s_quoteEnd);
    return ssb;
  }
View Full Code Here

TOP

Related Classes of com.uic.ase.proj.xbn.string.SOBStringBuffer

Copyright © 2018 www.massapicom. 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.