URN_AuthorityFactory changes for revisions 23109:23110

This class will not be ported to SIS. Experience has shown that attempts to handle HTTP and URN factories as AuthorityFactory was more a source of complications than conveniences.

Command line:

svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r23109:23110 https://svn.osgeo.org/geotools/trunk/modules/library/referencing/src/main/java/org/geotools/referencing/factory/URN_AuthorityFactory.java
Revision 23110
package org.geotools.referencing.crs;

import org.geotools.metadata.iso.citation.CitationImpl;
import org.geotools.metadata.iso.citation.ResponsiblePartyImpl;
import org.geotools.referencing.factory.AuthorityFactoryAdapter;
import org.geotools.util.SimpleInternationalString;
import org.opengis.metadata.citation.Citation;
import org.opengis.metadata.citation.PresentationForm;
import org.opengis.referencing.FactoryException;
import org.opengis.referencing.crs.CRSAuthorityFactory;
import org.opengis.referencing.crs.CoordinateReferenceSystem;


public class URNEPSGCRSAuthorityFactoryAdapter extends AuthorityFactoryAdapter
    implements CRSAuthorityFactory {

    private static final Citation EPSG;
    static {
       final CitationImpl c = new CitationImpl(ResponsiblePartyImpl.EPSG);
       c.setTitle( new SimpleInternationalString( "URN" ) );
       c.getPresentationForm().add(PresentationForm.TABLE_DIGITAL);
       EPSG = c;
    }

    public URNEPSGCRSAuthorityFactoryAdapter() {
       super( new EPSGCRSAuthorityFactory(),null,null,null);
    }

    public Citation getAuthority() {
       return EPSG;
    }

    public CoordinateReferenceSystem createCoordinateReferenceSystem(String code) throws FactoryException {
       if ( code.startsWith( "URN:X-OGC:DEF:CRS:EPSG:6.11.2:" ) ) {
         code = "EPSG:" + code.substring( "URN:X-OGC:DEF:CRS:EPSG:6.11.2:".length() );
       }

       return crsFactory.createCoordinateReferenceSystem( code );
    }


}