[rules-dev] Convert .brl to .drl

Geoffrey De Smet ge0ffrey.spam at gmail.com
Fri Mar 21 03:25:18 EDT 2008


common-io's FileUtils is great for doing that:
http://commons.apache.org/io/api-release/org/apache/commons/io/FileUtils.html#readFileToString(java.io.File)

With kind regards,
Geoffrey De Smet

Michael schreef:
> I have found this:
>  
> ....you can use the following snippet of code to convert the brl to a 
> drl rule:
>  
> BRXMLPersitence read = BRXMLPersitence.getInstance();
> BRDRLPersistence write = BRDRLPersistence.getInstance();
> String brl = ... read from the .brl file as needed...
> String outputDRL = write.marshall(read.unmarshal(brl));
> //then pass the outputDRL to the PackageBuilder as normal
>  
> Can you explain please: "String brl = ... read from the .brl file as 
> needed..."
> for example if I have  "first.brl" and I want "first.drl"
>  
> Thank you...
>  
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> rules-dev mailing list
> rules-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev




More information about the rules-dev mailing list