亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? ruleexecutionsetproviderimpl.java

?? drools 一個(gè)開放源碼的規(guī)則引擎
?? JAVA
字號(hào):
package org.drools.jsr94.rules.admin;

/*
 * $Id: RuleExecutionSetProviderImpl.java,v 1.19 2005/02/04 02:13:38 mproctor Exp $
 *
 * Copyright 2002-2004 (C) The Werken Company. All Rights Reserved.
 *
 * Redistribution and use of this software and associated documentation
 * ("Software"), with or without modification, are permitted provided that the
 * following conditions are met:
 *
 * 1. Redistributions of source code must retain copyright statements and
 * notices. Redistributions must also contain a copy of this document.
 *
 * 2. Redistributions in binary form must reproduce the above copyright notice,
 * this list of conditions and the following disclaimer in the documentation
 * and/or other materials provided with the distribution.
 *
 * 3. The name "drools" must not be used to endorse or promote products derived
 * from this Software without prior written permission of The Werken Company.
 * For written permission, please contact bob@werken.com.
 *
 * 4. Products derived from this Software may not be called "drools" nor may
 * "drools" appear in their names without prior written permission of The Werken
 * Company. "drools" is a registered trademark of The Werken Company.
 *
 * 5. Due credit should be given to The Werken Company.
 * (http://drools.werken.com/).
 *
 * THIS SOFTWARE IS PROVIDED BY THE WERKEN COMPANY AND CONTRIBUTORS ``AS IS''
 * AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE WERKEN COMPANY OR ITS CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 *
 */

import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.io.Serializable;
import java.net.URL;
import java.util.Map;

import javax.rules.admin.RuleExecutionSet;
import javax.rules.admin.RuleExecutionSetCreateException;
import javax.rules.admin.RuleExecutionSetProvider;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.sax.SAXResult;

import org.drools.io.RuleSetReader;
import org.drools.rule.RuleSet;
import org.drools.smf.DefaultSemanticsRepository;
import org.drools.smf.SemanticsReaderException;
import org.w3c.dom.Element;

/**
 * The Drools implementation of the <code>RuleExecutionSetProvider</code>
 * interface which defines <code>RuleExecutionSet</code> creation methods for
 * defining <code>RuleExecutionSet</code>s from potentially serializable
 * resources.
 *
 * @see RuleExecutionSetProvider
 *
 * @author N. Alex Rupp (n_alex <at>codehaus.org)
 * @author <a href="mailto:thomas.diesler@softcon-itec.de">thomas diesler </a>
 */
public class RuleExecutionSetProviderImpl implements RuleExecutionSetProvider
{
    /**
     * Creates a <code>RuleExecutionSet</code> implementation from an XML
     * Document and additional Drools-specific properties. A Drools-specific
     * rule execution set is read from the supplied XML Document.
     *
     * @param ruleExecutionSetElement the XML element that is the source of the
     *        rule execution set
     * @param properties additional properties used to create the
     *        <code>RuleExecutionSet</code> implementation.
     *        May be <code>null</code>.
     *
     * @throws RuleExecutionSetCreateException on rule execution set creation
     *         error.
     *
     * @return The created <code>RuleExecutionSet</code>.
     */
    public RuleExecutionSet createRuleExecutionSet(
            Element ruleExecutionSetElement, Map properties )
        throws RuleExecutionSetCreateException
    {
        // Prepare the DOM source
        Source source = new DOMSource( ruleExecutionSetElement );

        // Create a reader to handle the SAX events
        RuleSetReader reader;
        try
        {
            reader =
                new RuleSetReader( DefaultSemanticsRepository.getInstance( ) );
        }
        catch ( SemanticsReaderException e )
        {
            throw new RuleExecutionSetCreateException(
                "Couldn't get an instance of the DefaultSemanticsRepository: "
                + e );
        }
        catch ( IOException e )
        {
            throw new RuleExecutionSetCreateException(
                "Couldn't get an instance of the DefaultSemanticsRepository: "
                + e );
        }

        try
        {
            // Prepare the result
            SAXResult result = new SAXResult( reader );

            // Create a transformer
            Transformer xformer =
                TransformerFactory.newInstance( ).newTransformer( );

            // Traverse the DOM tree
            xformer.transform( source, result );
        }
        catch ( TransformerException e )
        {
            throw new RuleExecutionSetCreateException(
                "could not create RuleExecutionSet: " + e );
        }

        RuleSet ruleSet = reader.getRuleSet( );
        LocalRuleExecutionSetProviderImpl localRuleExecutionSetProvider =
            new LocalRuleExecutionSetProviderImpl( );
        return localRuleExecutionSetProvider.createRuleExecutionSet(
            ruleSet, properties );
    }

    /**
     * Creates a <code>RuleExecutionSet</code> implementation from a
     * Drools-specific Abstract Syntax Tree (AST) representation and
     * Drools-specific properties.
     * <p/>
     * This method accepts a <code>org.drools.RuleBase</code> object as its
     * vendor-specific AST representation.
     *
     * @param ruleExecutionSetAst the Drools representation of a
     *        rule execution set
     * @param properties additional properties used to create the
     *        <code>RuleExecutionSet</code> implementation.
     *        May be <code>null</code>.
     *
     * @throws RuleExecutionSetCreateException on rule execution set creation
     *         error.
     *
     * @return The created <code>RuleExecutionSet</code>.
     */
    public RuleExecutionSet createRuleExecutionSet(
            Serializable ruleExecutionSetAst, Map properties )
        throws RuleExecutionSetCreateException
    {
        if ( ruleExecutionSetAst instanceof RuleSet )
        {
            LocalRuleExecutionSetProviderImpl localRuleExecutionSetProvider =
                new LocalRuleExecutionSetProviderImpl( );
            return localRuleExecutionSetProvider.createRuleExecutionSet(
                ruleExecutionSetAst, properties );
        }
        else
        {
            throw new IllegalArgumentException( "Serializable object must be "
                + "an instance of org.drools.rule.RuleSet.  It was "
                + ruleExecutionSetAst.getClass( ).getName( ) );
        }
    }

    /**
     * Creates a <code>RuleExecutionSet</code> implementation from a URI.
     * The URI is opaque to the specification and may be used to refer to the
     * file system, a database, or Drools-specific datasource.
     *
     * @param ruleExecutionSetUri the URI to load the rule execution set from
     * @param properties additional properties used to create the
     *        <code>RuleExecutionSet</code> implementation.
     *        May be <code>null</code>.
     *
     * @throws RuleExecutionSetCreateException on rule execution set creation
     *         error.
     * @throws IOException if an I/O error occurs while accessing the URI
     *
     * @return The created <code>RuleExecutionSet</code>.
     */
    public RuleExecutionSet createRuleExecutionSet(
            String ruleExecutionSetUri, Map properties )
        throws RuleExecutionSetCreateException, IOException
    {
        InputStream in = null;
        try
        {
            LocalRuleExecutionSetProviderImpl localRuleExecutionSetProvider =
                new LocalRuleExecutionSetProviderImpl( );
            in = new URL( ruleExecutionSetUri ).openStream( );
            Reader reader = new InputStreamReader( in );
            return localRuleExecutionSetProvider.createRuleExecutionSet(
                reader, properties );
        }
        catch ( IOException ex )
        {
            throw ex;
        }
        finally
        {
            if ( in != null )
            {
                in.close( );
            }
        }
    }
}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91久久精品一区二区三| 日韩**一区毛片| 成人综合在线视频| 久久精品欧美一区二区三区不卡 | 91精品婷婷国产综合久久竹菊| 亚洲综合激情小说| 9191久久久久久久久久久| 日韩精品国产欧美| 精品久久久久久综合日本欧美| 国产一区二区在线视频| 国产精品色眯眯| 欧美性感一类影片在线播放| 视频在线在亚洲| 久久色.com| 97精品电影院| 日本人妖一区二区| 久久久久久久久久久黄色| 成人v精品蜜桃久久一区| 一区二区在线观看av| 欧美精品第1页| 国产精品亚洲人在线观看| 国产精品国产馆在线真实露脸 | 亚洲精品在线观看网站| 成人av在线影院| 天天爽夜夜爽夜夜爽精品视频| 精品捆绑美女sm三区| 大胆亚洲人体视频| 天天影视网天天综合色在线播放| 久久先锋资源网| 在线观看av一区| 黑人巨大精品欧美一区| 亚洲日本护士毛茸茸| 91精品综合久久久久久| 成人精品在线视频观看| 婷婷综合在线观看| 国产精品久久久久国产精品日日| 欧美日韩精品免费| 成人av第一页| 另类小说欧美激情| 亚洲专区一二三| 国产日韩精品一区| 777色狠狠一区二区三区| av网站免费线看精品| 麻豆一区二区三| 亚洲一区免费观看| 中文字幕在线观看一区| 日韩精品一区二区三区在线播放| 91色视频在线| 国产激情视频一区二区在线观看 | 中文字幕一区二区三区在线观看 | 日韩视频一区二区三区在线播放| 91亚洲资源网| 高清在线成人网| 久久精品国产**网站演员| 亚洲一级二级在线| 亚洲欧美一区二区视频| 久久夜色精品国产噜噜av | 成人av免费网站| 欧美日韩在线精品一区二区三区激情| 裸体一区二区三区| 天堂影院一区二区| 亚洲综合在线电影| 亚洲乱码中文字幕综合| 国产婷婷色一区二区三区在线| 欧美一区二区在线观看| 欧美日韩大陆一区二区| 色视频欧美一区二区三区| 成人av资源站| 成人免费视频视频| 成人性生交大片免费看中文网站| 日本不卡的三区四区五区| 亚洲国产另类av| 亚洲国产中文字幕在线视频综合| 亚洲精品国产无套在线观| 国产精品进线69影院| 国产精品久久久久久久久免费相片 | 亚洲综合在线电影| 一区二区三区中文在线| 亚洲欧美日韩电影| 一区二区三区中文免费| 亚洲综合另类小说| 日本人妖一区二区| 精品一区二区三区不卡| 国产伦精一区二区三区| 国产精品99久久久久| 国产成人免费在线观看| 成人精品国产福利| 99精品一区二区三区| 色欧美片视频在线观看在线视频| 91看片淫黄大片一级在线观看| 一本到不卡精品视频在线观看 | 自拍视频在线观看一区二区| 1000精品久久久久久久久| 亚洲精品成a人| 丝瓜av网站精品一区二区| 日本sm残虐另类| 国产精品亚洲第一| 99视频有精品| 在线精品视频免费观看| 337p亚洲精品色噜噜噜| 久久综合狠狠综合久久综合88| 国产亚洲欧美色| 亚洲六月丁香色婷婷综合久久| 亚洲成人一二三| 狠狠色伊人亚洲综合成人| 成人高清在线视频| 欧美色大人视频| 精品欧美一区二区在线观看| 中日韩av电影| 亚洲成人在线免费| 粗大黑人巨茎大战欧美成人| 一本一道综合狠狠老| 日韩亚洲电影在线| 国产精品久久久久久久久果冻传媒 | 国产在线精品一区二区三区不卡| 国产不卡一区视频| 欧美三级日韩三级国产三级| 精品国产sm最大网站免费看| 亚洲图片你懂的| 久久99精品久久久久久动态图| 不卡的看片网站| 欧美一激情一区二区三区| 国产精品毛片久久久久久| 一区二区高清在线| 国产精一区二区三区| 欧美无砖砖区免费| 中文字幕不卡在线观看| 三级久久三级久久久| 高潮精品一区videoshd| 欧美一区二区三区在线| 亚洲视频免费看| 国产一区二区不卡| 欧美高清性hdvideosex| 中文字幕一区二区三区四区| 免费不卡在线视频| 欧美性色欧美a在线播放| 国产欧美精品一区二区色综合| 图片区日韩欧美亚洲| 99精品久久只有精品| 精品成人在线观看| 日本在线不卡视频| 欧美亚洲国产bt| 亚洲图片激情小说| 国产成人综合网站| 精品欧美黑人一区二区三区| 亚洲午夜久久久久久久久电影院| 国产91精品入口| 久久久五月婷婷| 看电影不卡的网站| 欧美一级电影网站| 丝瓜av网站精品一区二区| 欧美在线播放高清精品| 亚洲另类春色校园小说| 成人午夜视频免费看| 久久久精品国产免费观看同学| 免费成人在线观看| 6080国产精品一区二区| 婷婷国产在线综合| 欧美精品亚洲一区二区在线播放| 一区二区三区四区在线免费观看| av在线这里只有精品| 国产精品国产三级国产三级人妇 | 97精品超碰一区二区三区| 国产精品嫩草影院com| 国产九色sp调教91| 国产欧美精品一区二区三区四区 | 日韩小视频在线观看专区| 蜜桃久久av一区| 日韩欧美另类在线| 久久se这里有精品| 精品国产三级a在线观看| 蜜桃av一区二区三区电影| 日韩欧美中文一区| 精品一区二区三区影院在线午夜| 欧美mv日韩mv国产网站app| 日韩成人精品在线| 日韩色视频在线观看| 国内精品不卡在线| 欧美激情在线一区二区三区| av一二三不卡影片| 一区二区三区电影在线播| 欧美性生活大片视频| 日本欧美久久久久免费播放网| 日韩手机在线导航| 国产成人小视频| 最新中文字幕一区二区三区| 欧洲一区二区三区在线| 五月激情综合色| 久久综合五月天婷婷伊人| 成人免费av网站| 亚洲高清在线视频| 精品国产乱码久久久久久1区2区 | 伦理电影国产精品| 日本一二三不卡| 欧美视频中文字幕| 韩国女主播成人在线| 亚洲视频你懂的| 日韩免费电影网站| av亚洲精华国产精华| 日韩成人免费电影|