numRows);
}
// TODO: Very hard to unit test -> needs refactoring
protected String buildAssetSource(Asset asset) throws SerializationException {
ContentHandler handler = ContentManager.getHandler(asset.getFormat());
StringBuilder stringBuilder = new StringBuilder();
if (handler.isRuleAsset()) {
BRMSPackageBuilder builder = new BRMSPackageBuilder();
// now we load up the DSL files
ModuleItem moduleItem = rulesRepository.loadModule(asset.getMetaData().getModuleName());
builder.setDSLFiles(DSLLoader.loadDSLMappingFiles(moduleItem));
if (asset.getMetaData().isBinary()) {
AssetItem item = rulesRepository.loadAssetByUUID(
asset.getUuid());
handler.storeAssetContent(asset,
item);
((IRuleAsset) handler).assembleDRL(builder,
item,
stringBuilder);
} else {