/** * Returns the name for the {@link IdentifiedObject} to construct. This method also search for * alias. * * @param name The name for the {@link IndentifiedObject} to construct. * @param code The EPSG code of the object to construct. * @param area The area of use, or {@code null} if none. * @param scope The scope, or {@code null} if none. * @param remarks Remarks, or {@code null} if none. * @return The name together with a set of properties. */ private Map<String, Object> createProperties( final String name, final String code, String area, String scope, String remarks) throws SQLException, FactoryException { final Map<String, Object> properties = createProperties(name, code, remarks); if (area != null && (area = area.trim()).length() != 0) { final Extent extent = buffered.createExtent(area); properties.put(Datum.DOMAIN_OF_VALIDITY_KEY, extent); } if (scope != null && (scope = scope.trim()).length() != 0) { properties.put(Datum.SCOPE_KEY, scope); } return properties; }
/** * Returns a {@linkplain Extent extent} (usually an area of validity) from a code. * * @throws FactoryException if the object creation failed. */ @Override public Extent createExtent(final String code) throws FactoryException { return getGeotoolsFactory("createExtent", code).createExtent(toBackingFactoryCode(code)); }
/** * Returns a {@linkplain Extent extent} (usually an area of validity) from a code. * * @throws FactoryException if the object creation failed for all factories. */ @Override public Extent createExtent(final String code) throws FactoryException { try { return super.createExtent(code); } catch (FactoryException exception) { notifyFailure("createExtent", exception); try { return fallback.createExtent(code); } catch (NoSuchAuthorityCodeException ignore) { throw exception; } } }
/** Returns an extent (usually an area of validity) from a code. */ @Override public synchronized Extent createExtent(final String code) throws FactoryException { final Extent extent; final String key = trimAuthority(code); final Object cached = objectCache.get(key); if (cached instanceof Extent) { extent = (Extent) cached; } else { extent = getBackingStore().createExtent(code); } objectCache.put(key, extent); return extent; }
/** * Returns an extent (usually an area of validity) from a code. * * @throws FactoryException if the object creation failed. */ @Override public synchronized Extent createExtent(final String code) throws FactoryException { final Extent extent; final String key = trimAuthority(code); final Object cached = get(key); if (cached instanceof Extent) { extent = (Extent) cached; } else { extent = getBackingStore().createExtent(code); } put(key, extent); return extent; }