ChangeSet chageSet = reader.read( resource.getReader() );
if ( chageSet == null ) {
// @TODO should log an error
}
for ( Resource nestedResource : chageSet.getResourcesAdded() ) {
InternalResource iNestedResourceResource = (InternalResource) nestedResource;
if ( iNestedResourceResource.isDirectory() ) {
this.resourceDirectories.add( iNestedResourceResource );
for ( Resource childResource : iNestedResourceResource.listResources() ) {
if ( ((InternalResource) childResource).isDirectory() ) {
continue; // ignore sub directories
}
((InternalResource) childResource).setResourceType( iNestedResourceResource.getResourceType() );
addKnowledgeResource( childResource,
iNestedResourceResource.getResourceType(),
iNestedResourceResource.getConfiguration() );
}
} else {
addKnowledgeResource( iNestedResourceResource,
iNestedResourceResource.getResourceType(),
iNestedResourceResource.getConfiguration() );
}
}
} else {
ResourceTypeBuilder builder = ResourceTypeBuilderRegistry.getInstance().getResourceTypeBuilder( type );
if ( builder != null ) {