@Test public void testAuthority(){ final Citation authority = factory.getAuthority(); assertNotNull(authority); assertEquals("European Petroleum Survey Group", authority.getTitle().toString()); assertTrue (Citations.identifierMatches(authority, "EPSG")); assertFalse(Citations.identifierMatches(authority, "ESRI")); assertTrue(factory instanceof FactoryUsingWKT); }
@Override public synchronized Citation getAuthority() { if (authority == null) { final Citation[] authorities = getAuthorities(); switch (authorities.length) { case 0: authority = Citations.EPSG; break; case 1: authority = authorities[0]; break; default: { final CitationImpl c = new CitationImpl(authorities[0]); final Collection<Identifier> identifiers = c.getIdentifiers(); for (int i=1; i<authorities.length; i++) { identifiers.addAll(authorities[i].getIdentifiers()); } c.freeze(); authority = c; break; } } } return authority; }
FactoryUsingWKT extends DeferredAuthorityFactory implements CRSAuthorityFactory { @Override public synchronized Citation getAuthority() { if (authority == null) { final Citation[] authorities = getAuthorities(); switch (authorities.length) { case 0: authority = Citations.EPSG; break; case 1: authority = authorities[0]; break; default: { final CitationImpl c = new CitationImpl(authorities[0]); final Collection<Identifier> identifiers = c.getIdentifiers(); for (int i=1; i<authorities.length; i++) { identifiers.addAll(authorities[i].getIdentifiers()); } c.freeze(); authority = c; break; } } } return authority; } }
FactoryUsingWKT extends DeferredAuthorityFactory implements CRSAuthorityFactory { @Override public synchronized Citation getAuthority() { if (authority == null) { final Citation[] authorities = getAuthorities(); switch (authorities.length) { case 0: authority = Citations.EPSG; break; case 1: authority = authorities[0]; break; default: { final CitationImpl c = new CitationImpl(authorities[0]); final Collection<Identifier> identifiers = c.getIdentifiers(); for (int i=1; i<authorities.length; i++) { identifiers.addAll(authorities[i].getIdentifiers()); } c.freeze(); authority = c; break; } } } return authority; } FactoryUsingWKT();  FactoryUsingWKT(final Hints userHints); protected  FactoryUsingWKT(final Hints userHints, final int priority); }
FactoryUsingWKT extends DeferredAuthorityFactory implements CRSAuthorityFactory { @Override public synchronized Citation getAuthority() { if (authority == null) { final Citation[] authorities = getAuthorities(); switch (authorities.length) { case 0: authority = Citations.EPSG; break; case 1: authority = authorities[0]; break; default: { final CitationImpl c = new CitationImpl(authorities[0]); final Collection<Identifier> identifiers = c.getIdentifiers(); for (int i=1; i<authorities.length; i++) { identifiers.addAll(authorities[i].getIdentifiers()); } c.freeze(); authority = c; break; } } } return authority; } FactoryUsingWKT();  FactoryUsingWKT(final Hints userHints); protected  FactoryUsingWKT(final Hints userHints, final int priority); @Override synchronized Citation getAuthority(); static void main(final String[] args); }
FactoryUsingWKT extends DeferredAuthorityFactory implements CRSAuthorityFactory { @Override public synchronized Citation getAuthority() { if (authority == null) { final Citation[] authorities = getAuthorities(); switch (authorities.length) { case 0: authority = Citations.EPSG; break; case 1: authority = authorities[0]; break; default: { final CitationImpl c = new CitationImpl(authorities[0]); final Collection<Identifier> identifiers = c.getIdentifiers(); for (int i=1; i<authorities.length; i++) { identifiers.addAll(authorities[i].getIdentifiers()); } c.freeze(); authority = c; break; } } } return authority; } FactoryUsingWKT();  FactoryUsingWKT(final Hints userHints); protected  FactoryUsingWKT(final Hints userHints, final int priority); @Override synchronized Citation getAuthority(); static void main(final String[] args); static final String FILENAME; }