Examples of SemanticModules


Examples of org.drools.xml.SemanticModules

                    JavaDialectConfiguration javaConf = (JavaDialectConfiguration) configuration.getDialectConfiguration( "java" );
                    javaConf.setJavaLanguageLevel( level );
                }
                configuration.getClassLoader().addClassLoader( newLoader );
               
                SemanticModules modules = configuration.getSemanticModules();
                modules.addSemanticModule( new BPMNSemanticModule() );
                modules.addSemanticModule( new BPMNDISemanticModule() );
                modules.addSemanticModule( new BPMNExtensionsSemanticModule() );
                modules.addSemanticModule( new ProcessSemanticModule() );
               
                XmlProcessReader xmlReader = new XmlProcessReader( modules, Thread.currentThread().getContextClassLoader() );
                List<org.kie.definition.process.Process> processes =
                    (List<org.kie.definition.process.Process>) xmlReader.read( new StringReader( input ) );
                if (processes != null) {
View Full Code Here

Examples of org.drools.xml.SemanticModules

    public void convertToBPMN2() {
        try {
            InputStreamReader isr = new InputStreamReader(((File) file).getContents());
            PackageBuilderConfiguration configuration = new PackageBuilderConfiguration();
            SemanticModules modules = configuration.getSemanticModules();
            modules.addSemanticModule(new ProcessSemanticModule());
            XmlProcessReader xmlReader = new XmlProcessReader( modules, Thread.currentThread().getContextClassLoader() );
            String xml = RuleFlowMigrator.convertReaderToString(isr);
            Reader reader = new StringReader(xml);
            List<Process> processes = xmlReader.read(reader);
            if (processes != null && processes.size() == 1) {
View Full Code Here

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,
                                                            null,
View Full Code Here

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

Examples of org.drools.xml.SemanticModules

   
    protected void createModel(InputStream is) {
        try
        {
            InputStreamReader isr = new InputStreamReader(is);
            SemanticModules semanticModules = new SemanticModules();
            semanticModules.addSemanticModule(new BPMNSemanticModule());
          semanticModules.addSemanticModule(new BPMNExtensionsSemanticModule());
            semanticModules.addSemanticModule(new BPMNDISemanticModule());
            XmlProcessReader xmlReader = new XmlProcessReader(semanticModules, Thread.currentThread().getContextClassLoader());

            try
            {
                List<Process> processes = xmlReader.read(isr);
View Full Code Here

Examples of org.drools.xml.SemanticModules

                    JavaDialectConfiguration javaConf = (JavaDialectConfiguration) configuration.getDialectConfiguration( "java" );
                    javaConf.setJavaLanguageLevel( level );
                }
                configuration.getClassLoader().addClassLoader( newLoader );
               
                SemanticModules modules = configuration.getSemanticModules();
                modules.addSemanticModule( new BPMNSemanticModule() );
                modules.addSemanticModule( new BPMNDISemanticModule() );
                modules.addSemanticModule( new BPMNExtensionsSemanticModule() );
                modules.addSemanticModule( new ProcessSemanticModule() );
               
                XmlProcessReader xmlReader = new XmlProcessReader( modules, Thread.currentThread().getContextClassLoader() );
                List<org.drools.definition.process.Process> processes =
                    (List<org.drools.definition.process.Process>) xmlReader.read( new StringReader( input ) );
                if (processes != null) {
View Full Code Here

Examples of org.drools.xml.SemanticModules

    }

    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

Examples of org.drools.xml.SemanticModules

        }
        return this.semanticModules;
    }

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

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

        // split on each space
View Full Code Here

Examples of org.drools.xml.SemanticModules

        }
        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

Examples of org.drools.xml.SemanticModules

    properties.setProperty(ClassLoaderCacheOption.PROPERTY_NAME, Boolean.FALSE.toString());
  }
 
  private ChangeSet readChangeSet(String xml) throws RuleServiceException
  {
    SemanticModules semanticModules = new SemanticModules();
    semanticModules.addSemanticModule(new ChangeSetSemanticModule());
    XmlChangeSetReader reader = new XmlChangeSetReader(semanticModules);
    reader.setClassLoader(classLoader, null);
    try
    {
      return reader.read(new StringReader(xml));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.