// Create some empty definitions.
definitions = new Definitions();
// Add the standard set of definitions.
DefinitionSet standardDefinitionSet = (DefinitionSet) loadZipObject(
DeviceRepositoryConstants.STANDARD_DEFINITIONS_XML,
DefinitionSet.class);
if (standardDefinitionSet == null) {
throw new RepositoryException(EXCEPTION_LOCALIZER.format(
"device-repository-file-missing",
DeviceRepositoryConstants.STANDARD_DEFINITIONS_XML));
}
addDefinitionSetToDefinitions(standardDefinitionSet, definitions);
// Add the custom set of definitions, if there are any.
DefinitionSet customDefinitionSet = (DefinitionSet) loadZipObject(
DeviceRepositoryConstants.CUSTOM_DEFINITIONS_XML,
DefinitionSet.class);
if (customDefinitionSet != null) {
// NOTE: here we only add categories, ignoring custom types.
// If we tried to add the types as well we blow up with a