throws IOException, ConfigurationException {
DefaultMetaInf inf = new DefaultMetaInf();
// filter
for (Entry entry: dir.getChildren()) {
String name = entry.getName();
VaultInputSource src = getInputSource(entry);
if (name.equals(Constants.FILTER_XML)) {
// load filter
inf.loadFilter(src.getByteStream(), src.getSystemId());
} else if (name.equals(Constants.CONFIG_XML)) {
// load config
inf.loadConfig(src.getByteStream(), src.getSystemId());
} else if (name.equals(Constants.SETTINGS_XML)) {
// load settings
inf.loadSettings(src.getByteStream(), src.getSystemId());
} else if (name.equals(Constants.PROPERTIES_XML)) {
// load properties
inf.loadProperties(src.getByteStream(), src.getSystemId());
} else if (name.equals(Constants.PRIVILEGES_XML)) {
// load privileges
inf.loadPrivileges(src.getByteStream(), src.getSystemId());
} else if (name.equals(Constants.PACKAGE_DEFINITION_XML)) {
inf.setHasDefinition(true);
log.info("Contains package definition {}.", src.getSystemId());
} else if (name.endsWith(".cnd")) {
try {
Reader r = new InputStreamReader(src.getByteStream(), "utf8");
CNDReader reader = ServiceProviderFactory.getProvider().getCNDReader();
reader.read(r, entry.getName(), null);
inf.getNodeTypes().add(reader);
log.info("Loaded nodetypes from {}.", src.getSystemId());
} catch (IOException e1) {
log.error("Error while reading CND: {}", e1.toString());
if (strict) {
throw e1;
}