Package org.jostraca.util

Examples of org.jostraca.util.ValueSet


      iRegExpMatchArguments      = RegExp.make( iRegExpText_MatchArguments, RegExp.ModeSet.DotMatchesNewline );
    }
    catch( Exception e ) {
      throw new DirectiveException
        ( DirectiveException.CODE_bad_regexp, e.getMessage(),
          new ValueSet( ValueCode.REGEXP, iRegExpText_MatchArguments ) );
    }

  }
View Full Code Here


      return match;
    }
    catch( RegExpException e ) {
      throw new DirectiveException
        ( DirectiveException.CODE_regexp_mismatch, e.getMessage(),
          new ValueSet( ValueCode.REGEXP, iRegExpText_MatchArguments,
                        ValueCode.CONTENT, pContent ) );
    }
  }
View Full Code Here

  public void testParameters() throws Exception {

    TextualTransformManager ttm     = new TextualTransformManager( "testParameters" );
    String                  classes = "TextElementTransform";
    PropertySet             ps      = new ValueSet( Property.lang_InsertPrefix, "[",
                                                    Property.lang_InsertSuffix, "]",
                                                    Property.lang_TextQuote,    "~");
   
    ttm.loadClasses( classes );
    ttm.setParameters( ps );
View Full Code Here

  /* Public Methods << */

  public void testTransform() {
    TextElementTransform t = new TextElementTransform();
    t.setParameters( new ValueSet( Property.lang_InsertPrefix, "<",
                                   Property.lang_InsertSuffix, ">",
                                   Property.lang_TextQuote,    "-") );
    assertTrue( "<-a->".equals( t.transform("a") ) );
   
  }
View Full Code Here

  /* Public Methods << */

  public void testTransform() {
    ExpressionElementTransform t = new ExpressionElementTransform();
    t.setParameters( new ValueSet( Property.lang_InsertPrefix, "<",
                                   Property.lang_InsertSuffix, ">") );
    assertTrue( "<a>".equals( t.transform("a") ) );
   
  }
View Full Code Here

                                   ? iRegExpIsDirective.match( pBlock.getContent() )
                                   : EMPTY ) ) );
    }
    catch( RegExpException ree ) {
      throw new TemplateElementProcessorException( TemplateElementProcessorException.CODE_regexp_failed,
                                                   new ValueSet( ValueCode.REGEXP, iRegExpIsDirective ), ree );
    }
  }
View Full Code Here

      }     
    }
    catch( Exception e ) {
      throw new TemplateElementProcessorException
        ( TemplateElementProcessorException.CODE_bad_regexp, e.getMessage(),
          new ValueSet( ValueCode.REGEXP, iRegExpText_IsDirective ) );
    }

    // MatchDirective
    try {
      if( ! Standard.EMPTY.equals( iDirectiveMarker ) ) {
        iRegExpText_MatchDirective = pPropertySet.get( Property.jostraca_regexp_MatchDirective );
        iRegExpMatchDirective      = RegExp.make( iRegExpText_MatchDirective, new RegExp.ModeSet( RegExp.Mode.DotMatchesNewline ) );
        iPerformMatchDirective     = true;
      }     
    }
    catch( Exception e ) {
      throw new TemplateElementProcessorException
        ( TemplateElementProcessorException.CODE_bad_regexp, e.getMessage(),
          new ValueSet( ValueCode.REGEXP, iRegExpText_MatchDirective ) );
    }

  }
View Full Code Here

      }     
    }
    catch( Exception e ) {
      throw new TemplateElementProcessorException
        ( TemplateElementProcessorException.CODE_bad_regexp, e.getMessage(),
          new ValueSet( ValueCode.REGEXP, iRegExpText_MatchSectionName,
                        ValueCode.NAME,   Property.jostraca_regexp_MatchSectionName ) );
    }

    try {
      if( Standard.EMPTY.equals( iDeclarationMarker ) ) {
        iPerformMatchDeclaration = false;
      }
      else {
        iRegExpText_MatchDeclaration = pPropertySet.get( Property.jostraca_regexp_MatchDeclaration );
        iRegExpMatchDeclaration      = RegExp.make( iRegExpText_MatchDeclaration, new RegExp.ModeSet( RegExp.Mode.DotMatchesNewline ) );
        iPerformMatchDeclaration     = true;
      }
    }
    catch( Exception e ) {
      throw new TemplateElementProcessorException
        ( TemplateElementProcessorException.CODE_bad_regexp, e.getMessage(),
          new ValueSet( ValueCode.REGEXP, iRegExpText_MatchDeclaration,
                        ValueCode.NAME,   Property.jostraca_regexp_MatchDeclaration ) );
    }
  }
View Full Code Here

      return match;
    }
    catch( Exception e ) {
      throw new TemplateElementProcessorException
        ( TemplateElementProcessorException.CODE_unexpected_regexp_mismatch, e.getMessage(),
          new ValueSet( ValueCode.REGEXP,  iRegExpText_MatchSectionName,
                        ValueCode.NAME,    Property.jostraca_regexp_MatchSectionName,
                        ValueCode.CONTENT, pContent ) );
    }
  }
View Full Code Here

      return match;
    }
    catch( Exception e ) {
      throw new TemplateElementProcessorException
        ( TemplateElementProcessorException.CODE_unexpected_regexp_mismatch, e.getMessage(),
          new ValueSet( ValueCode.REGEXP,  iRegExpText_MatchDeclaration,
                        ValueCode.NAME,    Property.jostraca_regexp_MatchDeclaration,
                        ValueCode.CONTENT, pContent ) );
    }
  }
View Full Code Here

TOP

Related Classes of org.jostraca.util.ValueSet

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.