Package org.drools.xml

Examples of org.drools.xml.SemanticModules


     *            A resource with the type set to ChangeSet
     * @return A ChangeSet that can be processed by this Agent.
     */
    public ChangeSet getChangeSet(Resource resource) {
        if ( this.semanticModules == null ) {
            this.semanticModules = new SemanticModules();
            this.semanticModules.addSemanticModule( new ChangeSetSemanticModule() );
        }

        XmlChangeSetReader reader = new XmlChangeSetReader( this.semanticModules );
        if ( resource instanceof ClassPathResource ) {
View Full Code Here


        }
        return this.semanticModules;
    }

    public void initSemanticModules() {
        this.semanticModules = new SemanticModules();
       
        RulesSemanticModule ruleModule = new RulesSemanticModule("http://ddefault");

        this.semanticModules.addSemanticModule( new WrapperSemanticModule("http://drools.org/drools-5.0",ruleModule) );
        this.semanticModules.addSemanticModule( new WrapperSemanticModule("http://drools.org/drools-5.2", ruleModule) );
View Full Code Here

        }
        return this.semanticModules;
    }

    public void initSemanticModules() {
        this.semanticModules = new SemanticModules();

        this.semanticModules.addSemanticModule( new ProcessSemanticModule() );
        this.semanticModules.addSemanticModule( new RulesSemanticModule() );
        this.semanticModules.addSemanticModule( new ChangeSetSemanticModule() );
View Full Code Here

        }
        return this.semanticModules;
    }

    public void initSemanticModules() {
        this.semanticModules = new SemanticModules();

        this.semanticModules.addSemanticModule( new RulesSemanticModule() );
        this.semanticModules.addSemanticModule( new ChangeSetSemanticModule() );

        // split on each space
View Full Code Here

    public static Map<String, String[]> extract(String json) throws Exception {
        Map<String, String[]> result = null;
        String xml = BPMN2ProcessHandler.serialize( getDesignerURL()+"/bpmn2_0serialization",
                                                    json );
        Reader isr = new StringReader( xml );
        SemanticModules semanticModules = new SemanticModules();
        semanticModules.addSemanticModule( new BPMNSemanticModule() );
        semanticModules.addSemanticModule( new BPMNDISemanticModule() );
        XmlProcessReader xmlReader = new XmlProcessReader( semanticModules,
                                                           getClassLoader() );
        RuleFlowProcess process = (RuleFlowProcess) xmlReader.read( isr );
        if ( process == null ) {
            throw new IllegalArgumentException( "Could not read process" );
View Full Code Here

    public static String inject(String json,
                                Map<String, String> constraints) throws Exception {
        String xml = BPMN2ProcessHandler.serialize( getDesignerURL()+"/bpmn2_0serialization",
                                                    json );
        Reader isr = new StringReader( xml );
        SemanticModules semanticModules = new SemanticModules();
        semanticModules.addSemanticModule( new BPMNSemanticModule() );
        semanticModules.addSemanticModule( new BPMNDISemanticModule() );
        XmlProcessReader xmlReader = new XmlProcessReader( semanticModules,
                                                           getClassLoader() );
        RuleFlowProcess process = (RuleFlowProcess) xmlReader.read( isr );
        isr.close();
        if ( process == null ) {
View Full Code Here

    public static Map<String, String[]> extract(String json) throws Exception {
        Map<String, String[]> result = null;
        String xml = BPMN2ProcessHandler.serialize( getDesignerURL()+"/bpmn2_0serialization",
                                                    json );
        Reader isr = new StringReader( xml );
        SemanticModules semanticModules = new SemanticModules();
        semanticModules.addSemanticModule( new BPMNSemanticModule() );
        semanticModules.addSemanticModule( new BPMNDISemanticModule() );
        XmlProcessReader xmlReader = new XmlProcessReader( semanticModules,
                                                           getClassLoader() );
        RuleFlowProcess process = (RuleFlowProcess) xmlReader.read( isr );
        if ( process == null ) {
            throw new IllegalArgumentException( "Could not read process" );
View Full Code Here

    public static String inject(String json,
                                Map<String, String> constraints) throws Exception {
        String xml = BPMN2ProcessHandler.serialize( getDesignerURL()+"/bpmn2_0serialization",
                                                    json );
        Reader isr = new StringReader( xml );
        SemanticModules semanticModules = new SemanticModules();
        semanticModules.addSemanticModule( new BPMNSemanticModule() );
        semanticModules.addSemanticModule( new BPMNDISemanticModule() );
        XmlProcessReader xmlReader = new XmlProcessReader( semanticModules,
                                                           getClassLoader() );
        RuleFlowProcess process = (RuleFlowProcess) xmlReader.read( isr );
        isr.close();
        if ( process == null ) {
View Full Code Here

    public static Map<String, String[]> extract(String json) throws Exception {
        Map<String, String[]> result = null;
        String xml = BPMN2ProcessHandler.serialize( "http://localhost:8080/designer/bpmn2_0serialization",
                                                    json );
        Reader isr = new StringReader( xml );
        SemanticModules semanticModules = new SemanticModules();
        semanticModules.addSemanticModule( new BPMNSemanticModule() );
        semanticModules.addSemanticModule( new BPMNDISemanticModule() );
        XmlProcessReader xmlReader = new XmlProcessReader( semanticModules,
                                                           getClassLoader() );
        RuleFlowProcess process = (RuleFlowProcess) xmlReader.read( isr );
        if ( process == null ) {
            throw new IllegalArgumentException( "Could not read process" );
View Full Code Here

    public static String inject(String json,
                                Map<String, String> constraints) throws Exception {
        String xml = BPMN2ProcessHandler.serialize( "http://localhost:8080/designer/bpmn2_0serialization",
                                                    json );
        Reader isr = new StringReader( xml );
        SemanticModules semanticModules = new SemanticModules();
        semanticModules.addSemanticModule( new BPMNSemanticModule() );
        semanticModules.addSemanticModule( new BPMNDISemanticModule() );
        XmlProcessReader xmlReader = new XmlProcessReader( semanticModules,
                                                           getClassLoader() );
        RuleFlowProcess process = (RuleFlowProcess) xmlReader.read( isr );
        isr.close();
        if ( process == null ) {
View Full Code Here

TOP

Related Classes of org.drools.xml.SemanticModules

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.