org.drools.io.ResourceFactory Maven / Gradle / Ivy
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