private Element get(String crsId) {
Element crsList = new Element("crsList");
for (Object object : ReferencingFactoryFinder
.getCRSAuthorityFactories(null)) {
CRSAuthorityFactory factory = (CRSAuthorityFactory) object;
try {
Set<String> codes = factory
.getAuthorityCodes(CoordinateReferenceSystem.class);
for (Object codeObj : codes) {
String code = (String) codeObj;
if (code.equals(crsId)) {
String authorityTitle = (factory.getAuthority()
.getTitle() == null ? "" : factory
.getAuthority().getTitle().toString());
String authorityEdition = (factory.getAuthority()
.getEdition() == null ? "" : factory
.getAuthority().getEdition().toString());
String authorityCodeSpace = "";
Collection<? extends Identifier> ids = factory
.getAuthority().getIdentifiers();
for (Identifier id : ids) {
authorityCodeSpace = id.getCode();
}
String description;
try {
description = factory.getDescriptionText(code)
.toString();
} catch (Exception e1) {
description = "-";
}
description += " (" + authorityCodeSpace + ":" + code