/** * Forward the call to the {@linkplain MatrixParameterDescriptors matrix parameter descriptors} * specified at construction time. */ public Collection<GenericName> getAlias() { return descriptor.getAlias(); }
alias = generalDescriptor.getAlias(); if (alias != null) { for (final GenericName a : alias) {
/** * Returns the name of the given authority declared in the given parameter descriptor. * This method is used only as a way to avoid creating many instances of the same name. */ static GenericName sameNameAs(final Citation authority, final GeneralParameterDescriptor parameters) { for (final GenericName candidate : parameters.getAlias()) { if (candidate instanceof Identifier && ((Identifier) candidate).getAuthority() == authority) { return candidate; } } throw new NoSuchElementException(); }
/** * Returns the name of the given authority declared in the given parameter descriptor. * This method is used only as a way to avoid creating many instances of the same name. */ static GenericName sameNameAs(final Citation authority, final GeneralParameterDescriptor parameters) { for (final GenericName candidate : parameters.getAlias()) { if (candidate instanceof Identifier && ((Identifier) candidate).getAuthority() == authority) { return candidate; } } throw new NoSuchElementException(); }
/** * Returns the name of the given authority declared in the given parameter descriptor. * This method is used only as a way to avoid creating many instances of the same name. */ static NamedIdentifier sameNameAs(final Citation authority, final GeneralParameterDescriptor parameters) { for (final GenericName candidate : parameters.getAlias()) { if (candidate instanceof NamedIdentifier) { final NamedIdentifier name = (NamedIdentifier) candidate; if (name.getAuthority() == authority) { return name; } } } throw new NoSuchElementException(); }
/** * Check if given descriptor name or aliases are contained in the map. */ private static boolean containsKey(Map<String,?> params, GeneralParameterDescriptor desc) { //check the name if (params.containsKey(desc.getName().getCode())) { return true; } //check alias for (GenericName alias : desc.getAlias()) { if (params.containsKey(alias.tip().toString())) { return true; } } return false; }
&& complete.getMaximumOccurs() == maximumOccurs && expected.entrySet().containsAll(actual.entrySet()) && containsAll(complete.getAlias(), provided.getAlias()) && containsAll(complete.getIdentifiers(), provided.getIdentifiers()); if (canSubstitute && !isGroup) { mergeArrays(GeneralParameterDescriptor.ALIAS_KEY, GenericName.class, provided.getAlias(), merged, complete.getName()); mergeArrays(GeneralParameterDescriptor.IDENTIFIERS_KEY, ReferenceIdentifier.class, provided.getIdentifiers(), merged, null); if (isGroup) {
&& complete.getMaximumOccurs() == maximumOccurs && expected.entrySet().containsAll(actual.entrySet()) && containsAll(complete.getAlias(), provided.getAlias()) && containsAll(complete.getIdentifiers(), provided.getIdentifiers()); if (canSubstitute && !isGroup) { mergeArrays(GeneralParameterDescriptor.ALIAS_KEY, GenericName.class, provided.getAlias(), merged, complete.getName()); mergeArrays(GeneralParameterDescriptor.IDENTIFIERS_KEY, ReferenceIdentifier.class, provided.getIdentifiers(), merged, null); if (isGroup) {
+ " was already defined elsewhere. The same instance could be shared."); for (final GenericName alias : param.getAlias()) { existing = namesAndIdentifiers.put(alias, alias); if (existing != null && existing != alias) {
/** * Asserts that the primary name of the given parameter is the given name in the EPSG namespace. * Then asserts that the first alias (ignoring other EPSG alias) of the given parameter is the * given name in the OGC namespace. */ private static void assertParamEquals(final String epsgName, final String ogcName, final boolean isMandatory, final GeneralParameterDescriptor actual) { if (epsgName != null) { assertEpsgIdentifierEquals(epsgName, actual.getName()); } else { assertOgcIdentifierEquals(ogcName, actual.getName()); } assertEquals("minimumOccurs", isMandatory ? 1 : 0, actual.getMinimumOccurs()); if (epsgName != null) { for (final GenericName alias : actual.getAlias()) { if (alias instanceof ReferenceIdentifier && ((ReferenceIdentifier) alias).getAuthority() != Citations.EPSG) { assertOgcIdentifierEquals(ogcName, (ReferenceIdentifier) alias); return; } } fail("OGC alias not found."); } }