/** Returns a vertical coordinate reference system from a code. */
 @Override
 public synchronized VerticalCRS createVerticalCRS(final String code) throws FactoryException {
   final VerticalCRS crs;
   final String key = trimAuthority(code);
   final Object cached = objectCache.get(key);
   if (cached instanceof VerticalCRS) {
     crs = (VerticalCRS) cached;
   } else {
     crs = getBackingStore().createVerticalCRS(code);
   }
   objectCache.put(key, crs);
   return crs;
 }
 /** Returns an unit from a code. */
 @Override
 public synchronized Unit<?> createUnit(final String code) throws FactoryException {
   final Unit<?> unit;
   final String key = trimAuthority(code);
   final Object cached = objectCache.get(key);
   if (cached instanceof Unit) {
     unit = (Unit) cached;
   } else {
     unit = getBackingStore().createUnit(code);
   }
   objectCache.put(key, unit);
   return unit;
 }
 /** Returns a temporal coordinate system from a code. */
 @Override
 public synchronized TimeCS createTimeCS(final String code) throws FactoryException {
   final TimeCS cs;
   final String key = trimAuthority(code);
   final Object cached = objectCache.get(key);
   if (cached instanceof TimeCS) {
     cs = (TimeCS) cached;
   } else {
     cs = getBackingStore().createTimeCS(code);
   }
   objectCache.put(key, cs);
   return cs;
 }
 /** 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 a prime meridian from a code. */
 @Override
 public synchronized PrimeMeridian createPrimeMeridian(final String code) throws FactoryException {
   final PrimeMeridian meridian;
   final String key = trimAuthority(code);
   final Object cached = objectCache.get(key);
   if (cached instanceof PrimeMeridian) {
     meridian = (PrimeMeridian) cached;
   } else {
     meridian = getBackingStore().createPrimeMeridian(code);
   }
   objectCache.put(key, meridian);
   return meridian;
 }
 /** Returns an ellipsoid from a code. */
 @Override
 public synchronized Ellipsoid createEllipsoid(final String code) throws FactoryException {
   final Ellipsoid ellipsoid;
   final String key = trimAuthority(code);
   final Object cached = objectCache.get(key);
   if (cached instanceof Ellipsoid) {
     ellipsoid = (Ellipsoid) cached;
   } else {
     ellipsoid = getBackingStore().createEllipsoid(code);
   }
   objectCache.put(key, ellipsoid);
   return ellipsoid;
 }
 /** Returns a geodetic datum from a code. */
 @Override
 public synchronized GeodeticDatum createGeodeticDatum(final String code) throws FactoryException {
   final GeodeticDatum datum;
   final String key = trimAuthority(code);
   final Object cached = objectCache.get(key);
   if (cached instanceof GeodeticDatum) {
     datum = (GeodeticDatum) cached;
   } else {
     datum = getBackingStore().createGeodeticDatum(code);
   }
   objectCache.put(key, datum);
   return datum;
 }
 /** Returns an arbitrary object from a code. */
 @Override
 public synchronized IdentifiedObject createObject(final String code) throws FactoryException {
   final IdentifiedObject object;
   final String key = trimAuthority(code);
   final Object cached = objectCache.get(key);
   if (cached instanceof IdentifiedObject) {
     object = (IdentifiedObject) cached;
   } else {
     object = getBackingStore().createObject(code);
   }
   objectCache.put(key, object);
   return object;
 }
 /** Returns an operation from a single operation code. */
 @Override
 public synchronized CoordinateOperation createCoordinateOperation(final String code)
     throws FactoryException {
   final CoordinateOperation operation;
   final String key = trimAuthority(code);
   final Object cached = objectCache.get(key);
   if (cached instanceof CoordinateOperation) {
     operation = (CoordinateOperation) cached;
   } else {
     operation = getBackingStore().createCoordinateOperation(code);
   }
   objectCache.put(key, operation);
   return operation;
 }
 /** Returns an operation method from a code. */
 @Override
 public synchronized OperationMethod createOperationMethod(final String code)
     throws FactoryException {
   final OperationMethod method;
   final String key = trimAuthority(code);
   final Object cached = objectCache.get(key);
   if (cached instanceof OperationMethod) {
     method = (OperationMethod) cached;
   } else {
     method = getBackingStore().createOperationMethod(code);
   }
   objectCache.put(key, method);
   return method;
 }
 /** Returns a parameter descriptor from a code. */
 @Override
 public synchronized ParameterDescriptor createParameterDescriptor(final String code)
     throws FactoryException {
   final ParameterDescriptor parameter;
   final String key = trimAuthority(code);
   final Object cached = objectCache.get(key);
   if (cached instanceof ParameterDescriptor) {
     parameter = (ParameterDescriptor) cached;
   } else {
     parameter = getBackingStore().createParameterDescriptor(code);
   }
   objectCache.put(key, parameter);
   return parameter;
 }
 /** Returns an arbitrary coordinate reference system from a code. */
 @Override
 public synchronized CoordinateReferenceSystem createCoordinateReferenceSystem(final String code)
     throws FactoryException {
   final CoordinateReferenceSystem crs;
   final String key = trimAuthority(code);
   final Object cached = objectCache.get(key);
   if (cached instanceof CoordinateReferenceSystem) {
     crs = (CoordinateReferenceSystem) cached;
   } else {
     crs = getBackingStore().createCoordinateReferenceSystem(code);
   }
   objectCache.put(key, crs);
   return crs;
 }
 /** Returns a coordinate system axis from a code. */
 @Override
 public synchronized CoordinateSystemAxis createCoordinateSystemAxis(final String code)
     throws FactoryException {
   final CoordinateSystemAxis axis;
   final String key = trimAuthority(code);
   final Object cached = objectCache.get(key);
   if (cached instanceof CoordinateSystemAxis) {
     axis = (CoordinateSystemAxis) cached;
   } else {
     axis = getBackingStore().createCoordinateSystemAxis(code);
   }
   objectCache.put(key, axis);
   return axis;
 }
 /** Returns an operation from coordinate reference system codes. */
 @Override
 public synchronized Set<CoordinateOperation> createFromCoordinateReferenceSystemCodes(
     final String sourceCode, final String targetCode) throws FactoryException {
   final Set<CoordinateOperation> operations;
   final CodePair key = new CodePair(trimAuthority(sourceCode), trimAuthority(targetCode));
   final Object cached = objectCache.get(key);
   if (cached instanceof CoordinateOperation) {
     operations = (Set<CoordinateOperation>) cached;
   } else {
     operations =
         Collections.unmodifiableSet(
             getBackingStore().createFromCoordinateReferenceSystemCodes(sourceCode, targetCode));
   }
   objectCache.put(key, operations);
   return operations;
 }
 /** Releases resources immediately instead of waiting for the garbage collector. */
 @Override
 public synchronized void dispose() throws FactoryException {
   if (backingStore != null) {
     backingStore.dispose();
     backingStore = null;
   }
   objectCache.clear();
   super.dispose();
 }