Package com.uic.ase.proj.xbn.template

Examples of com.uic.ase.proj.xbn.template.TemplateDataOrString


  public final i_i addUnqGapNamesToACS(VWString vws_uniqueGaps, ForLineRetrieval flr_srcTxt, GapConfig gap_config, Outputter optr_dbg)  {
    throwAXIfNull(flr_srcTxt, "flr_srcTxt", "getAOSUniqueGapNames");
    throwAXIfNull(gap_config, "gap_config", "getAOSUniqueGapNames");
    throwAXIfNull(optr_dbg, "optr_dbg", "getAOSUniqueGapNames");

    TemplateDataOrString tdos = null;
    try  {
      tdos = new TemplateDataOrString(null, flr_srcTxt, (new TParseConfig(gap_config, true, optr_dbg)));
    catch(AssertException ax)  {
      throwAX("getAOSUniqueGapNames:  Attempting to create a TemplateDataOrString:  " + ax.toString());
    catch(TemplateFormatException tfx)  {
      throwAX("getAOSUniqueGapNames:  Attempting to create a TemplateDataOrString:  " + tfx.toString());
    }

    if(vws_uniqueGaps == null)  {
      vws_uniqueGaps = new VWString();
    }

    i_i ii = new i_i(0, 0);

    if(tdos.isString())  {
      return ii;
    }

    ii.i2 = tdos.getTemplateData().getAOSLookup().getUSAPAbsolute().getLength();

    boolean bExists = false;
    for(int i = 0; i < tdos.getTemplateData().getAOSLookup().getUSAPUnique().getLength(); i++, bExists = false)  {
      String sGapName = tdos.getTemplateData().getAOSLookup().getUSAPUnique().getUniqueString(i).getString();

      for(int j = 0; j < vws_uniqueGaps.size()  &&  !bExists; j++)  {
        if(vws_uniqueGaps.getString(0).equals(sGapName))  {
          bExists = true;
        }
View Full Code Here


    if(as_fillText.length != i_rqdUniqueGaps)  {
      throwAX("getFilledXGapsTString:  as_fillText.length (" + as_fillText.length + ") must equal i_rqdUniqueGaps (" + i_rqdUniqueGaps + ").");
    }

    TemplateDataOrString tdos = null;
    try  {
      tdos = new TemplateDataOrString(new FLRString(s_templateWithXGaps));
    catch(TemplateFormatException tfx)  {
      throwAX("getFilledXGapsTString:  " + tfx.toString());
    }

    if(tdos.isString())  {
      throwAX("getFilledXGapsTString:  There are no gaps found in s_templateWithXGaps.");
    }

    Template t = new Template(tdos.getTemplateData());
    if(t.getUSAPUnique().getLength() != i_rqdUniqueGaps)  {
      throwAX("getFilledXGapsTString:  There are " + t.getUSAPUnique().getLength() + " unique gaps in s_templateWithOneGap.  It is required to have exactly " + i_rqdUniqueGaps + ".");
    }

    tf.setTemplate(t);
View Full Code Here

    @param  flr_srcTxt  The source text for this Template.  May not be null.
    @param  tp_config  The configuration defining a gap.  May not be null.
    @param  template_filter  The TFilter used to enforce the integrity of the about-to-be-retrieved template text.  If null, no restrictions are imposed.  See <A HREF="#getTFilter()">getTFilter</A>.
   **/
  public Template(String s_name, ForLineRetrieval flr_srcTxt, TParseConfig tp_config, TFilter template_filter) throws TemplateFormatException  {
    TemplateDataOrString tdos = new TemplateDataOrString(s_name, flr_srcTxt, tp_config);

    //Using getName() will throw a NullPointerException...START
      if(!tdos.isTemplate())  {
        throw new TemplateFormatException("constructor:  There are no gaps in the provided template text.  TemplateDataOrString.isTemplate() equals false.");
      }

      tData = tdos.getTemplateData();
    //Using getName() will throw a NullPointerException...END

    if(template_filter != null  &&  !template_filter.isTemplateValid(this))  {
      throwTFX(sCNSTR, "This template is invalid according to template_filter.isTemplateValid().");
    }
View Full Code Here

TOP

Related Classes of com.uic.ase.proj.xbn.template.TemplateDataOrString

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.