/** Returns the authority names of every factories given at construction time. */ public Set<String> getAuthorityNames() { final Set<String> names = new HashSet<String>(); final Collection<AuthorityFactory> factories = getFactories(); if (factories != null) { for (final AuthorityFactory factory : factories) { names.add(Citations.getIdentifier(factory.getAuthority())); } } return names; }
/** * Creates an exception for a missing factory. We actually returns an instance of {@link * NoSuchAuthorityCodeException} because this kind of exception is treated especially by {@link * FallbackAuthorityFactory}. */ private FactoryException missingFactory(final Class category, final String code) { return new NoSuchAuthorityCodeException( Errors.format(ErrorKeys.FACTORY_NOT_FOUND_$1, category), Citations.getIdentifier(getAuthority()), trimAuthority(code)); }
final Citation authority = factory.getAuthority(); if (authority != null) { authorityNames.add(Citations.getIdentifier(authority)); for (final Identifier id : authority.getIdentifiers()) { authorityNames.add(id.getCode());