Package org.opengis.referencing

Examples of org.opengis.referencing.AuthorityFactory


     */
    private static AuthorityFactory create(final boolean automatic, int interfaceMask,
                                           final Iterator<? extends AuthorityFactory> factories)
            throws FactoryNotFoundException
    {
        AuthorityFactory primary = factories.next();
        if (factories.hasNext()) {
            AuthorityFactory fallback = create(true, interfaceMask, factories);
            while (fallback != primary) { // Paranoiac check
                if (!sameAuthorityCodes(fallback, primary)) {
                    /*
                     * (Note: argument order is significant in the above method call)
                     * Creates a "primary - fallback" chain only if the fallback is not
View Full Code Here


        /*
         * The following assertion fails if we try to implements some
         * interfaces not supported by the primary or fallback factory.
         */
        assert (mask & ~(interfaceMask(primary) | interfaceMask(fallback))) == 0 : mask;
        final AuthorityFactory factory;
        /*
         * In the 'switch' statement below, we do not implement all possible combinaisons
         * of authority factories. Only a few common combinaisons are listed. Other
         * combinaisons will fallback on some reasonable default. We may complete the
         * list later if there is a need for that.
View Full Code Here

     * is not null.
     */
    private AbstractAuthorityFactory getGeotoolsFactory(final String caller, final String code)
            throws FactoryException
    {
        final AuthorityFactory candidate = getAuthorityFactory(code);
        if (candidate instanceof AbstractAuthorityFactory) {
            return (AbstractAuthorityFactory) candidate;
        }
        if (caller == null) {
            return null;
View Full Code Here

     */
    @SuppressWarnings("unchecked")
    <T extends AuthorityFactory> T getAuthorityFactory(final Class<T> type, final String code)
            throws FactoryException
    {
        final AuthorityFactory f;
        if (CRSAuthorityFactory.class.equals(type)) {
            f = getCRSAuthorityFactory(code);
        } else if (CSAuthorityFactory.class.equals(type)) {
            f = getCSAuthorityFactory(code);
        } else if (DatumAuthorityFactory.class.equals(type)) {
View Full Code Here

     * fetch the factory group from the CS authority factory. This is used by subclasses like
     * {@link TransformedAuthorityFactory} that need low-level access to factories. Do not change
     * this method into a public one; we would need a better API before to do such thing.
     */
    final ReferencingFactoryContainer getFactoryContainer(final boolean crs) {
        final AuthorityFactory factory;
        if (crs) {
            factory = crsFactory;
        } else {
            factory = csFactory;
        }
View Full Code Here

            throws FactoryException
    {
        if (code != null) {
            final URI_Parser parser = getParser(code);
            parser.logWarningIfTypeMismatch(this, DatumAuthorityFactory.class);
            final AuthorityFactory factory = getVersionedFactory(parser);
            if (factory instanceof DatumAuthorityFactory) {
                return (DatumAuthorityFactory) factory;
            }
        }
        return super.getDatumAuthorityFactory(code);
View Full Code Here

            throws FactoryException
    {
        if (code != null) {
            final URI_Parser parser = getParser(code);
            parser.logWarningIfTypeMismatch(this, CSAuthorityFactory.class);
            final AuthorityFactory factory = getVersionedFactory(parser);
            if (factory instanceof CSAuthorityFactory) {
                return (CSAuthorityFactory) factory;
            }
        }
        return super.getCSAuthorityFactory(code);
View Full Code Here

            throws FactoryException
    {
        if (code != null) {
            final URI_Parser parser = getParser(code);
            parser.logWarningIfTypeMismatch(this, CRSAuthorityFactory.class);
            final AuthorityFactory factory = getVersionedFactory(parser);
            if (factory instanceof CRSAuthorityFactory) {
                return (CRSAuthorityFactory) factory;
            }
        }
        return super.getCRSAuthorityFactory(code);
View Full Code Here

            throws FactoryException
    {
        if (code != null) {
            final URI_Parser parser = getParser(code);
            parser.logWarningIfTypeMismatch(this, CoordinateOperationAuthorityFactory.class);
            final AuthorityFactory factory = getVersionedFactory(parser);
            if (factory instanceof CoordinateOperationAuthorityFactory) {
                return (CoordinateOperationAuthorityFactory) factory;
            }
        }
        return super.getCoordinateOperationAuthorityFactory(code);
View Full Code Here

    {
        final Version version = parser.version;
        if (version == null) {
            return null;
        }
        AuthorityFactory factory;
        synchronized (byVersions) {
            factory = byVersions.get(version);
            if (factory == null) {
                factory = createVersionedFactory(version);
                if (factory != null) {
View Full Code Here

TOP

Related Classes of org.opengis.referencing.AuthorityFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.