/** * Gets the identified EntityDescriptor from the metadata. This method should not check if the provider is * initialized, if arguments are null, if the metadata is valid, etc. All of this is done by the invoker of this * method. * * @param entityID ID of the EntityDescriptor, never null * * @return the identified EntityDescriptor or null if no such EntityDescriptor exists * * @throws MetadataProviderException thrown if there is a problem searching for the EntityDescriptor */ protected EntityDescriptor doGetEntityDescriptor(String entityID) throws MetadataProviderException { XMLObject metadata = doGetMetadata(); if (metadata == null) { log.debug("Metadata document was empty, unable to look for an EntityDescriptor with the ID {}", entityID); return null; } return getEntityDescriptorById(entityID, metadata); }
+ "elements is the one we're looking for."); if (metadata instanceof EntitiesDescriptor) { descriptor = getEntityDescriptorById(entityID, (EntitiesDescriptor) metadata);
if (entitiesDescriptors != null && !entitiesDescriptors.isEmpty()) { for (EntitiesDescriptor entitiesDescriptor : descriptor.getEntitiesDescriptors()) { entityDescriptor = getEntityDescriptorById(entityID, entitiesDescriptor); if (entityDescriptor != null) {