All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.drools.io.ResourceFactory Maven / Gradle / Ivy

There is a newer version: 5.1.1
Show newest version
package org.drools.io;

import java.io.File;
import java.io.InputStream;
import java.io.Reader;
import java.net.URL;

import org.drools.ProviderInitializationException;

/**
 * 

* Convenience Factory to provide Resource implementations for the desired IO resource. *

* *
 * KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
 * kbuilder.add( ResourceFactory.newUrlResource( "htp://www.domain.org/myflow.drf" ),
 *                ResourceType.DRF );
 * 
* KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); * kbuilder.add( ResourceFactory.newClassPathResource( "htp://www.domain.org/myrules.drl", getClass() ), * ResourceType.DRL ); *
cls = (Class) Class.forName( "org.drools.io.impl.ResourceProviderImpl" ); setResourceProvider( cls.newInstance() ); } catch ( Exception e2 ) { throw new ProviderInitializationException( "Provider org.drools.io.impl.ResourceProviderImpl could not be set.", e2 ); } } }



© 2015 - 2024 Weber Informatics LLC | Privacy Policy