ChangeSet changeSet = reader.read( resource.getReader() );
if ( changeSet == null ) {
// @TODO should log an error
}
for ( Resource nestedResource : changeSet.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 if ( ResourceType.XSD.equals( type ) ) {
JaxbConfigurationImpl confImpl = ( JaxbConfigurationImpl ) configuration;
String[] classes = DroolsJaxbHelperProviderImpl.addXsdModel( resource, this, confImpl.getXjcOpts(), confImpl.getSystemId() );