Rule format based on {@link org.sonar.api.server.rule.RulesDefinitionXmlLoader}
428013
private static void printAsXML(Rule rule, StringBuilder xmlStringBuilder) {
    if (rule.version != null) {
      xmlStringBuilder.append("  <!-- since " + rule.version + " -->");
      xmlStringBuilder.append(LINE_SEPARATOR);
    }
    xmlStringBuilder.append("  <rule>");
    xmlStringBuilder.append(LINE_SEPARATOR);
    xmlStringBuilder.append("    <key>" + rule.fixedRuleKey() + "</key>");
    xmlStringBuilder.append(LINE_SEPARATOR);
    xmlStringBuilder.append("    <severity>" + rule.severity + "</severity>");
    xmlStringBuilder.append(LINE_SEPARATOR);
    xmlStringBuilder.append("    <name><![CDATA[" + rule.name + "]]></name>");
    xmlStringBuilder.append(LINE_SEPARATOR);
    xmlStringBuilder.append("    <internalKey><![CDATA[" + rule.internalKey + "]]></internalKey>");
    xmlStringBuilder.append(LINE_SEPARATOR);
    xmlStringBuilder.append("    <description><![CDATA[" + rule.description + "]]></description>");
    xmlStringBuilder.append(LINE_SEPARATOR);
    if (!rule.tags.isEmpty()) {
      for (String tag : rule.tags) {
        xmlStringBuilder.append("    <tag>" + tag + "</tag>");
        xmlStringBuilder.append(LINE_SEPARATOR);
      }
    }

    if (!rule.parameters.isEmpty()) {
      List<RuleParameter> sortedParameters = Lists.newArrayList(rule.parameters);
      Collections.sort(sortedParameters, new Comparator<RuleParameter>() {
        @Override
        public int compare(RuleParameter o1, RuleParameter o2) {
          return o1.key.compareTo(o2.key);
        }
      });
      for (RuleParameter parameter : sortedParameters) {
        xmlStringBuilder.append("    <param>");
        xmlStringBuilder.append(LINE_SEPARATOR);
        xmlStringBuilder.append("      <key>" + parameter.key + "</key>");
        xmlStringBuilder.append(LINE_SEPARATOR);
        if (StringUtils.isNotBlank(parameter.description)) {
          xmlStringBuilder.append("      <description><![CDATA[" + parameter.description + "]]></description>");
          xmlStringBuilder.append(LINE_SEPARATOR);
        }
        if (StringUtils.isNotBlank(parameter.defaultValue) && !"null".equals(parameter.defaultValue)) {
          xmlStringBuilder.append("      <defaultValue>" + parameter.defaultValue + "</defaultValue>");
          xmlStringBuilder.append(LINE_SEPARATOR);
        }
        xmlStringBuilder.append("    </param>");
        xmlStringBuilder.append(LINE_SEPARATOR);
      }
    }

    xmlStringBuilder.append("  </rule>");
    xmlStringBuilder.append(LINE_SEPARATOR);
    xmlStringBuilder.append(LINE_SEPARATOR);
  }
22236
public RuleConditionElement build(final RuleBuildContext context,
                                      final BaseDescr descr,
                                      final Pattern prefixPattern) {
        boolean typesafe = context.isTypesafe();
        // it must be an EvalDescr
        final EvalDescr evalDescr = (EvalDescr) descr;

        try {
            MVELDialect dialect = (MVELDialect) context.getDialect( "mvel" );

            Map<String, Declaration> decls = context.getDeclarationResolver().getDeclarations(context.getRule());
            
            AnalysisResult analysis = context.getDialect().analyzeExpression( context,
                                                                              evalDescr,
                                                                              evalDescr.getContent(),
                                                                              new BoundIdentifiers( DeclarationScopeResolver.getDeclarationClasses( decls ),
                                                                                                    context ) );

            final BoundIdentifiers usedIdentifiers = analysis.getBoundIdentifiers();
            int i = usedIdentifiers.getDeclrClasses().keySet().size();
            Declaration[] previousDeclarations = new Declaration[i];
            i = 0;
            for ( String id :  usedIdentifiers.getDeclrClasses().keySet() ) {
                previousDeclarations[i++] = decls.get( id );
            }
            Arrays.sort( previousDeclarations, SortDeclarations.instance  ); 
            
            MVELCompilationUnit unit = dialect.getMVELCompilationUnit( (String) evalDescr.getContent(),
                                                                       analysis,
                                                                       previousDeclarations,
                                                                       null,
                                                                       null,
                                                                       context,
                                                                       "drools",
                                                                       KnowledgeHelper.class,
                                                                       false,
                                                                       MVELCompilationUnit.Scope.EXPRESSION );
            final EvalCondition eval = new EvalCondition( previousDeclarations );

            MVELEvalExpression expr = new MVELEvalExpression( unit,
                                                              dialect.getId() );
            eval.setEvalExpression( KiePolicyHelper.isPolicyEnabled() ? new SafeEvalExpression(expr) : expr );

            MVELDialectRuntimeData data = (MVELDialectRuntimeData) context.getPkg().getDialectRuntimeRegistry().getDialectData( "mvel" );
            data.addCompileable( eval,
                                  expr );

            expr.compile( data, context.getRule() );
            return eval;
        } catch ( final Exception e ) {
            copyErrorLocation(e, evalDescr);
            context.addError( new DescrBuildError( context.getParentDescr(),
                                                          evalDescr,
                                                          e,
                                                          "Unable to build expression for 'eval':" + e.getMessage() + " '" + evalDescr.getContent() + "'" ) );
            return null;
        } finally {
            context.setTypesafe( typesafe );
        }
    }
140117
static Document loadDefinition(final File def) {
        // Parse the jDPL definition into a DOM tree.
        final Document document = XmlUtils.parseFile(def);
        if (document == null) {
            return null;
        }

        // Log the jPDL version from the process definition (if applicable and available).
        final Node xmlnsNode = document.getFirstChild().getAttributes().getNamedItem("xmlns");
        if (xmlnsNode != null && StringUtils.isNotBlank(xmlnsNode.getNodeValue()) && xmlnsNode.getNodeValue().contains("jpdl")) {
            final String version = xmlnsNode.getNodeValue().substring(xmlnsNode.getNodeValue().length() - 3);
            LOGGER.info("jPDL version == " + version);
        }

        return document;
    }
1296301
protected void getSAXRules() {

    arrRuleRecords.clear();

    Vector<SAXRule> rules = new Vector<SAXRule>(numRules.intValue());
    rules.addElement(this);

    SAXRule currentRule;

    int processedRules = 0;

    StringBuilder sbCurrentRule = new StringBuilder();

    while (processedRules < rules.size()) {

      currentRule = rules.elementAt(processedRules);

      for (SAXSymbol sym = currentRule.first(); (!sym.isGuard()); sym = sym.n) {
        if (sym.isNonTerminal()) {
          SAXRule referedTo = ((SAXNonTerminal) sym).r;
          if ((rules.size() > referedTo.index) && (rules.elementAt(referedTo.index) == referedTo)) {
            index = referedTo.index;
          }
          else {
            index = rules.size();
            referedTo.index = index;
            rules.addElement(referedTo);
          }
          sbCurrentRule.append('R');
          sbCurrentRule.append(index);
        }
        else {
          sbCurrentRule.append(sym.value);
        }
        sbCurrentRule.append(' ');
      }

      GrammarRuleRecord ruleConteiner = new GrammarRuleRecord();

      ruleConteiner.setRuleNumber(processedRules);
      ruleConteiner.setRuleString(sbCurrentRule.toString());

      ruleConteiner.setRuleLevel(currentRule.getLevel());

      ruleConteiner.setRuleUseFrequency(currentRule.count);
      ruleConteiner.setOccurrences(currentRule.getIndexes());

      arrRuleRecords.add(ruleConteiner);

      sbCurrentRule = new StringBuilder();
      processedRules++;
    }

  }
403047
public final EObject ruleSarlXLoopFormalParameter() throws RecognitionException {
        EObject current = null;

        Token lv_extension_1_0=null;
        Token otherlv_3=null;
        AntlrDatatypeRuleToken lv_name_2_0 = null;

        EObject lv_parameterType_4_0 = null;



        	enterRule();

        try {
            // InternalSARL.g:8462:2: ( ( () ( (lv_extension_1_0= 'extension' ) )? ( (lv_name_2_0= ruleValidID ) ) (otherlv_3= 'as' ( (lv_parameterType_4_0= ruleJvmTypeReference ) ) )? ) )
            // InternalSARL.g:8463:2: ( () ( (lv_extension_1_0= 'extension' ) )? ( (lv_name_2_0= ruleValidID ) ) (otherlv_3= 'as' ( (lv_parameterType_4_0= ruleJvmTypeReference ) ) )? )
            {
            // InternalSARL.g:8463:2: ( () ( (lv_extension_1_0= 'extension' ) )? ( (lv_name_2_0= ruleValidID ) ) (otherlv_3= 'as' ( (lv_parameterType_4_0= ruleJvmTypeReference ) ) )? )
            // InternalSARL.g:8464:3: () ( (lv_extension_1_0= 'extension' ) )? ( (lv_name_2_0= ruleValidID ) ) (otherlv_3= 'as' ( (lv_parameterType_4_0= ruleJvmTypeReference ) ) )?
            {
            // InternalSARL.g:8464:3: ()
            // InternalSARL.g:8465:4: 
            {
            if ( state.backtracking==0 ) {

              				current = forceCreateModelElement(
              					grammarAccess.getSarlXLoopFormalParameterAccess().getXtendFormalParameterAction_0(),
              					current);
              			
            }

            }

            // InternalSARL.g:8471:3: ( (lv_extension_1_0= 'extension' ) )?
            int alt229=2;
            int LA229_0 = input.LA(1);

            if ( (LA229_0==45) ) {
                alt229=1;
            }
            switch (alt229) {
                case 1 :
                    // InternalSARL.g:8472:4: (lv_extension_1_0= 'extension' )
                    {
                    // InternalSARL.g:8472:4: (lv_extension_1_0= 'extension' )
                    // InternalSARL.g:8473:5: lv_extension_1_0= 'extension'
                    {
                    lv_extension_1_0=(Token)match(input,45,FOLLOW_3); if (state.failed) return current;
                    if ( state.backtracking==0 ) {

                      					newLeafNode(lv_extension_1_0, grammarAccess.getSarlXLoopFormalParameterAccess().getExtensionExtensionKeyword_1_0());
                      				
                    }
                    if ( state.backtracking==0 ) {

                      					if (current==null) {
                      						current = createModelElement(grammarAccess.getSarlXLoopFormalParameterRule());
                      					}
                      					setWithLastConsumed(current, "extension", true, "extension");
                      				
                    }

                    }


                    }
                    break;

            }

            // InternalSARL.g:8485:3: ( (lv_name_2_0= ruleValidID ) )
            // InternalSARL.g:8486:4: (lv_name_2_0= ruleValidID )
            {
            // InternalSARL.g:8486:4: (lv_name_2_0= ruleValidID )
            // InternalSARL.g:8487:5: lv_name_2_0= ruleValidID
            {
            if ( state.backtracking==0 ) {

              					newCompositeNode(grammarAccess.getSarlXLoopFormalParameterAccess().getNameValidIDParserRuleCall_2_0());
              				
            }
            pushFollow(FOLLOW_74);
            lv_name_2_0=ruleValidID();

            state._fsp--;
            if (state.failed) return current;
            if ( state.backtracking==0 ) {

              					if (current==null) {
              						current = createModelElementForParent(grammarAccess.getSarlXLoopFormalParameterRule());
              					}
              					set(
              						current,
              						"name",
              						lv_name_2_0,
              						"org.eclipse.xtend.core.Xtend.ValidID");
              					afterParserOrEnumRuleCall();
              				
            }

            }


            }

            // InternalSARL.g:8504:3: (otherlv_3= 'as' ( (lv_parameterType_4_0= ruleJvmTypeReference ) ) )?
            int alt230=2;
            int LA230_0 = input.LA(1);

            if ( (LA230_0==64) ) {
                alt230=1;
            }
            switch (alt230) {
                case 1 :
                    // InternalSARL.g:8505:4: otherlv_3= 'as' ( (lv_parameterType_4_0= ruleJvmTypeReference ) )
                    {
                    otherlv_3=(Token)match(input,64,FOLLOW_41); if (state.failed) return current;
                    if ( state.backtracking==0 ) {

                      				newLeafNode(otherlv_3, grammarAccess.getSarlXLoopFormalParameterAccess().getAsKeyword_3_0());
                      			
                    }
                    // InternalSARL.g:8509:4: ( (lv_parameterType_4_0= ruleJvmTypeReference ) )
                    // InternalSARL.g:8510:5: (lv_parameterType_4_0= ruleJvmTypeReference )
                    {
                    // InternalSARL.g:8510:5: (lv_parameterType_4_0= ruleJvmTypeReference )
                    // InternalSARL.g:8511:6: lv_parameterType_4_0= ruleJvmTypeReference
                    {
                    if ( state.backtracking==0 ) {

                      						newCompositeNode(grammarAccess.getSarlXLoopFormalParameterAccess().getParameterTypeJvmTypeReferenceParserRuleCall_3_1_0());
                      					
                    }
                    pushFollow(FOLLOW_2);
                    lv_parameterType_4_0=ruleJvmTypeReference();

                    state._fsp--;
                    if (state.failed) return current;
                    if ( state.backtracking==0 ) {

                      						if (current==null) {
                      							current = createModelElementForParent(grammarAccess.getSarlXLoopFormalParameterRule());
                      						}
                      						set(
                      							current,
                      							"parameterType",
                      							lv_parameterType_4_0,
                      							"org.eclipse.xtext.xbase.Xtype.JvmTypeReference");
                      						afterParserOrEnumRuleCall();
                      					
                    }

                    }


                    }


                    }
                    break;

            }


            }


            }

            if ( state.backtracking==0 ) {

              	leaveRule();

            }
        }

            catch (RecognitionException re) {
                recover(input,re);
                appendSkippedTokens();
            }
        finally {
        }
        return current;
    }
915851
public final void synpred37_InternalXbaseWithAnnotations_fragment() throws RecognitionException {   
        // InternalXbaseWithAnnotations.g:4699:6: ( ( () ( ( ( ruleJvmFormalParameter ) ) ( ',' ( ( ruleJvmFormalParameter ) ) )* )? ( ( '|' ) ) ) )
        // InternalXbaseWithAnnotations.g:4699:7: ( () ( ( ( ruleJvmFormalParameter ) ) ( ',' ( ( ruleJvmFormalParameter ) ) )* )? ( ( '|' ) ) )
        {
        // InternalXbaseWithAnnotations.g:4699:7: ( () ( ( ( ruleJvmFormalParameter ) ) ( ',' ( ( ruleJvmFormalParameter ) ) )* )? ( ( '|' ) ) )
        // InternalXbaseWithAnnotations.g:4700:7: () ( ( ( ruleJvmFormalParameter ) ) ( ',' ( ( ruleJvmFormalParameter ) ) )* )? ( ( '|' ) )
        {
        // InternalXbaseWithAnnotations.g:4700:7: ()
        // InternalXbaseWithAnnotations.g:4701:7: 
        {
        }

        // InternalXbaseWithAnnotations.g:4702:7: ( ( ( ruleJvmFormalParameter ) ) ( ',' ( ( ruleJvmFormalParameter ) ) )* )?
        int alt132=2;
        int LA132_0 = input.LA(1);

        if ( (LA132_0==RULE_ID||LA132_0==14||LA132_0==39) ) {
            alt132=1;
        }
        switch (alt132) {
            case 1 :
                // InternalXbaseWithAnnotations.g:4703:8: ( ( ruleJvmFormalParameter ) ) ( ',' ( ( ruleJvmFormalParameter ) ) )*
                {
                // InternalXbaseWithAnnotations.g:4703:8: ( ( ruleJvmFormalParameter ) )
                // InternalXbaseWithAnnotations.g:4704:9: ( ruleJvmFormalParameter )
                {
                // InternalXbaseWithAnnotations.g:4704:9: ( ruleJvmFormalParameter )
                // InternalXbaseWithAnnotations.g:4705:10: ruleJvmFormalParameter
                {
                pushFollow(FOLLOW_43);
                ruleJvmFormalParameter();

                state._fsp--;
                if (state.failed) return ;

                }


                }

                // InternalXbaseWithAnnotations.g:4708:8: ( ',' ( ( ruleJvmFormalParameter ) ) )*
                loop131:
                do {
                    int alt131=2;
                    int LA131_0 = input.LA(1);

                    if ( (LA131_0==15) ) {
                        alt131=1;
                    }


                    switch (alt131) {
                	case 1 :
                	    // InternalXbaseWithAnnotations.g:4709:9: ',' ( ( ruleJvmFormalParameter ) )
                	    {
                	    match(input,15,FOLLOW_22); if (state.failed) return ;
                	    // InternalXbaseWithAnnotations.g:4710:9: ( ( ruleJvmFormalParameter ) )
                	    // InternalXbaseWithAnnotations.g:4711:10: ( ruleJvmFormalParameter )
                	    {
                	    // InternalXbaseWithAnnotations.g:4711:10: ( ruleJvmFormalParameter )
                	    // InternalXbaseWithAnnotations.g:4712:11: ruleJvmFormalParameter
                	    {
                	    pushFollow(FOLLOW_43);
                	    ruleJvmFormalParameter();

                	    state._fsp--;
                	    if (state.failed) return ;

                	    }


                	    }


                	    }
                	    break;

                	default :
                	    break loop131;
                    }
                } while (true);


                }
                break;

        }

        // InternalXbaseWithAnnotations.g:4717:7: ( ( '|' ) )
        // InternalXbaseWithAnnotations.g:4718:8: ( '|' )
        {
        // InternalXbaseWithAnnotations.g:4718:8: ( '|' )
        // InternalXbaseWithAnnotations.g:4719:9: '|'
        {
        match(input,57,FOLLOW_2); if (state.failed) return ;

        }


        }


        }


        }
    }
366976
private void parseRule( Rule rule ) {
        ruleStack.add( rule );
        for( ;; ) {
            int ch = reader.nextBlockMarker();
            switch( ch ) {
                case -1:
                    throw createException( "Unexpected end of Less data" );
                case ';':
                    parseSemicolon( rule );
                    break;
                case '{':
                    parseBlock( rule );
                    break;
                case '}':
                    parseSemicolon( rule );
                    ruleStack.removeLast();
                    return;
                default:
                    throw createException( "Unrecognized input: '" + reader.getLookAhead() + "'" );
            }
        }

    }
584619
private List<JqassistantRules> readXmlSource(RuleSource ruleSource) {
        List<JqassistantRules> rules = new ArrayList<>();
        try (InputStream inputStream = ruleSource.getInputStream()) {
            JqassistantRules jqassistantRules = jaxbUnmarshaller.unmarshal(inputStream);
            rules.add(jqassistantRules);
        } catch (IOException e) {
            throw new IllegalArgumentException("Cannot read rules from '" + ruleSource.getId() + "'.", e);
        }
        return rules;
    }
1050503
public final void ruleXStringLiteral() throws RecognitionException {

        		int stackSize = keepStackSize();
        	
        try {
            // InternalXbase.g:1371:2: ( ( ( rule__XStringLiteral__Group__0 ) ) )
            // InternalXbase.g:1372:2: ( ( rule__XStringLiteral__Group__0 ) )
            {
            // InternalXbase.g:1372:2: ( ( rule__XStringLiteral__Group__0 ) )
            // InternalXbase.g:1373:3: ( rule__XStringLiteral__Group__0 )
            {
            if ( state.backtracking==0 ) {
               before(grammarAccess.getXStringLiteralAccess().getGroup()); 
            }
            // InternalXbase.g:1374:3: ( rule__XStringLiteral__Group__0 )
            // InternalXbase.g:1374:4: rule__XStringLiteral__Group__0
            {
            pushFollow(FOLLOW_2);
            rule__XStringLiteral__Group__0();

            state._fsp--;
            if (state.failed) return ;

            }

            if ( state.backtracking==0 ) {
               after(grammarAccess.getXStringLiteralAccess().getGroup()); 
            }

            }


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {

            	restoreStackSize(stackSize);

        }
        return ;
    }
1008501
protected Format parseAdditionalFormat(
        CmsObject cms,
        I_CmsXmlContentValueLocation location,
        CmsResource functionRes) {

        I_CmsXmlContentValueLocation jspLoc = location.getSubValue("FunctionProvider");
        CmsUUID structureId = jspLoc.asId(cms);
        I_CmsXmlContentValueLocation minWidthLoc = location.getSubValue("MinWidth");
        String minWidth = getStringValue(cms, minWidthLoc, "");
        I_CmsXmlContentValueLocation maxWidthLoc = location.getSubValue("MaxWidth");
        String maxWidth = getStringValue(cms, maxWidthLoc, "");
        I_CmsXmlContentValueLocation typeLoc = location.getSubValue("Type");
        String type = getStringValue(cms, typeLoc, "");
        Map<String, String> parameters = parseParameters(cms, location, "Parameter");
        return new Format(structureId, type, minWidth, maxWidth, parameters);
    }
855986
public final AntlrDatatypeRuleToken ruleFeatureCallID() throws RecognitionException {
        AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();

        AntlrDatatypeRuleToken this_ValidID_0 = null;



        	enterRule();

        try {
            // InternalPureXbase.g:187:2: (this_ValidID_0= ruleValidID )
            // InternalPureXbase.g:188:2: this_ValidID_0= ruleValidID
            {
            if ( state.backtracking==0 ) {

              		newCompositeNode(grammarAccess.getFeatureCallIDAccess().getValidIDParserRuleCall());
              	
            }
            pushFollow(FOLLOW_2);
            this_ValidID_0=ruleValidID();

            state._fsp--;
            if (state.failed) return current;
            if ( state.backtracking==0 ) {

              		current.merge(this_ValidID_0);
              	
            }
            if ( state.backtracking==0 ) {

              		afterParserOrEnumRuleCall();
              	
            }

            }

            if ( state.backtracking==0 ) {

              	leaveRule();

            }
        }

            catch (RecognitionException re) {
                recover(input,re);
                appendSkippedTokens();
            }
        finally {
        }
        return current;
    }
1242205
public static void addResourceTypeXmlRules(Digester digester) {

        // add rules for resource types
        digester.addFactoryCreate("*/" + N_RESOURCETYPES + "/" + N_TYPE, CmsDigesterResourceTypeCreationFactory.class);
        digester.addSetNext("*/" + N_RESOURCETYPES + "/" + N_TYPE, I_CmsResourceType.ADD_RESOURCE_TYPE_METHOD);

        // please note: the order of the rules is very important here,
        // the "set next" rule (above) must be added _before_ the "call method" rule (below)!
        // reason is digester will call the rule that was last added first
        // here we must make sure that the resource type is initialized first (with the "call method" rule)
        // before it is actually added to the resource type container (with the "set next" rule)
        // otherwise there will be an empty resource type added to the container, and validation will not work
        digester.addCallMethod(
            "*/" + N_RESOURCETYPES + "/" + N_TYPE,
            I_CmsConfigurationParameterHandler.INIT_CONFIGURATION_METHOD,
            3);
        // please note: the resource types use a special version of the init method with 3 parameters
        digester.addCallParam("*/" + N_RESOURCETYPES + "/" + N_TYPE, 0, A_NAME);
        digester.addCallParam("*/" + N_RESOURCETYPES + "/" + N_TYPE, 1, A_ID);
        digester.addCallParam("*/" + N_RESOURCETYPES + "/" + N_TYPE, 2, A_CLASS);

        // add rules for default properties
        digester.addObjectCreate(
            "*/" + N_RESOURCETYPES + "/" + N_TYPE + "/" + N_PROPERTIES + "/" + N_PROPERTY,
            CmsProperty.class);
        digester.addCallMethod(
            "*/" + N_RESOURCETYPES + "/" + N_TYPE + "/" + N_PROPERTIES + "/" + N_PROPERTY + "/" + N_NAME,
            "setName",
            1);
        digester.addCallParam(
            "*/" + N_RESOURCETYPES + "/" + N_TYPE + "/" + N_PROPERTIES + "/" + N_PROPERTY + "/" + N_NAME,
            0);

        digester.addCallMethod(
            "*/" + N_RESOURCETYPES + "/" + N_TYPE + "/" + N_PROPERTIES + "/" + N_PROPERTY + "/" + N_VALUE,
            "setValue",
            2);
        digester.addCallParam(
            "*/" + N_RESOURCETYPES + "/" + N_TYPE + "/" + N_PROPERTIES + "/" + N_PROPERTY + "/" + N_VALUE,
            0);
        digester.addCallParam(
            "*/" + N_RESOURCETYPES + "/" + N_TYPE + "/" + N_PROPERTIES + "/" + N_PROPERTY + "/" + N_VALUE,
            1,
            A_TYPE);

        digester.addSetNext(
            "*/" + N_RESOURCETYPES + "/" + N_TYPE + "/" + N_PROPERTIES + "/" + N_PROPERTY,
            "addDefaultProperty");

        // extension mapping rules
        digester.addCallMethod(
            "*/" + N_RESOURCETYPES + "/" + N_TYPE + "/" + N_MAPPINGS + "/" + N_MAPPING,
            I_CmsResourceType.ADD_MAPPING_METHOD,
            1);
        digester.addCallParam("*/" + N_RESOURCETYPES + "/" + N_TYPE + "/" + N_MAPPINGS + "/" + N_MAPPING, 0, A_SUFFIX);

        digester.addCallMethod(
            "*/" + N_RESOURCETYPES + "/" + N_TYPE + "/" + N_COPY_RESOURCES,
            "setAdjustLinksFolder",
            1);
        digester.addCallParam("*/" + N_RESOURCETYPES + "/" + N_TYPE + "/" + N_COPY_RESOURCES, 0, A_ADJUST_LINKS_FOLDER);

        // copy resource rules
        digester.addCallMethod(
            "*/" + N_RESOURCETYPES + "/" + N_TYPE + "/" + N_COPY_RESOURCES + "/" + N_COPY_RESOURCE,
            "addCopyResource",
            3);
        digester.addCallParam(
            "*/" + N_RESOURCETYPES + "/" + N_TYPE + "/" + N_COPY_RESOURCES + "/" + N_COPY_RESOURCE,
            0,
            A_SOURCE);
        digester.addCallParam(
            "*/" + N_RESOURCETYPES + "/" + N_TYPE + "/" + N_COPY_RESOURCES + "/" + N_COPY_RESOURCE,
            1,
            A_TARGET);
        digester.addCallParam(
            "*/" + N_RESOURCETYPES + "/" + N_TYPE + "/" + N_COPY_RESOURCES + "/" + N_COPY_RESOURCE,
            2,
            A_TYPE);
    }
872928
private void setupFormat(final ConditionNumberFormatter formatter) {

        if(formatter.containsSymbolTerm(Token.SYMBOL_SLASH)) {
            // 分数として処理する
            setupFormatAsFraction(formatter);
        } else {
            // 数値として処理する
            setupFormatAsDecimal(formatter);
        }

    }
317891
public static Collection<String> filterClassesBasedOnBeansXML(BeansXml beansXml, final ResourceLoader resourceLoader, Set<String> classes) {
        if (beansXml != null && beansXml.getBeanDiscoveryMode().equals(BeanDiscoveryMode.NONE)) {
            // if the integrator for some reason ignored the "none" flag make sure we do not process the archive
            return Collections.emptySet();
        }
        Function<Metadata<Filter>, Predicate<String>> filterToPredicateFunction = new Function<Metadata<Filter>, Predicate<String>>() {

            @Override
            public Predicate<String> apply(Metadata<Filter> from) {
                return new FilterPredicate(from, resourceLoader);
            }

        };
        Collection<String> classNames;
        if (beansXml != null && beansXml.getScanning() != null) {
            Collection<Metadata<Filter>> includeFilters;
            if (beansXml.getScanning().getIncludes() != null) {
                includeFilters = beansXml.getScanning().getIncludes();
            } else {
                includeFilters = Collections.emptyList();
            }
            Collection<Metadata<Filter>> excludeFilters;
            if (beansXml.getScanning().getExcludes() != null) {
                excludeFilters = beansXml.getScanning().getExcludes();
            } else {
                excludeFilters = Collections.emptyList();
            }
            /*
             * Take a copy of the transformed collection, this means that the
             * filter predicate is only built once per filter predicate
             */
            Collection<Predicate<String>> includes;
            if (includeFilters.isEmpty()) {
                includes = Collections.emptyList();
            } else {
                includes = new ArrayList<Predicate<String>>(includeFilters.size());
                for (Metadata<Filter> includeFilter : includeFilters) {
                    includes.add(filterToPredicateFunction.apply(includeFilter));
                }
            }
            Collection<Predicate<String>> excludes;
            if (excludeFilters.isEmpty()) {
                excludes = Collections.emptyList();
            } else {
                excludes = new ArrayList<Predicate<String>>(excludeFilters.size());
                for (Metadata<Filter> excludeFilter : excludeFilters) {
                    excludes.add(filterToPredicateFunction.apply(excludeFilter));
                }
            }
            Predicate<String> filters = new ScanningPredicate<String>(includes, excludes);
            classNames = new HashSet<>();
            for (String beanClass : classes) {
                if (filters.test(beanClass)) {
                    classNames.add(beanClass);
                }
            }
        } else {
            classNames = classes;
        }
        return classNames;
    }
98881
private void loadBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_loadBtnActionPerformed
	//issue request to URL in GUI
        MatchRulesLoader loader = new MatchRulesLoader(urlTextField.getText());
        loader.start();
    }
1216707
public final void ruleXExpression() throws RecognitionException {

        		int stackSize = keepStackSize();
        	
        try {
            // InternalXbase.g:71:2: ( ( ruleXAssignment ) )
            // InternalXbase.g:72:2: ( ruleXAssignment )
            {
            // InternalXbase.g:72:2: ( ruleXAssignment )
            // InternalXbase.g:73:3: ruleXAssignment
            {
            if ( state.backtracking==0 ) {
               before(grammarAccess.getXExpressionAccess().getXAssignmentParserRuleCall()); 
            }
            pushFollow(FOLLOW_2);
            ruleXAssignment();

            state._fsp--;
            if (state.failed) return ;
            if ( state.backtracking==0 ) {
               after(grammarAccess.getXExpressionAccess().getXAssignmentParserRuleCall()); 
            }

            }


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {

            	restoreStackSize(stackSize);

        }
        return ;
    }
884704
public static JaxbDataFormat augmentJaxbDataFormatDefinition(JaxbDataFormat jaxbDataFormat) {
        Set<String> set = new HashSet<String>();

        for (String clsName : DroolsJaxbHelperProviderImpl.JAXB_ANNOTATED_CMD) {
            set.add(clsName.substring(0, clsName.lastIndexOf('.')));
        }

        StringBuilder sb = new StringBuilder();
        String contextPath = jaxbDataFormat.getContextPath();
        if (contextPath != null) {
            sb.append(contextPath);
        }
        sb.append(":");
        for (String pkgName : set) {
            sb.append(pkgName);
            sb.append(':');
        }

        jaxbDataFormat.setContextPath(sb.toString());
        return jaxbDataFormat;
    }