dataStoreMeta.addFiedMeta(fieldMeta);
logger.debug("Link column [" + fieldName + ": " + link + "] added succesfully");
} catch(Throwable t) {
throw new GeoEngineException("Impossible to add link column [" + fieldName + ": " + link + "] to datastore", t);
}
record = null;
try {
logger.debug("Valorizing link column [" + fieldName + ": " + link + "] for each record in the dataset ...");
Iterator it = dataStore.iterator();
while(it.hasNext()) {
record = (IRecord)it.next();
if(link != null) {
logger.debug("Added link value [" + link.toXString(record, env) + "]");
field = new Field( link.toXString(record, env) );
} else {
field = new Field( Link.DEFAULT_BASE_URL );
logger.debug("Added link value [" + Link.DEFAULT_BASE_URL + "]");
}
record.appendField( field );
}
logger.debug("Link column [" + fieldName + ": " + link + "] has been succesfully valorized for each record in the dataset ");
} catch(Throwable t) {
throw new GeoEngineException("Impossible to valorize link column for record [" + record + "]", t);
}
} catch(Throwable t) {
GeoEngineException e;
if(t instanceof GeoEngineException) {
e = (GeoEngineException)t;
} else {
e = new GeoEngineException("An unpredicted error occurred while adding link fields to datastore", t);
}
throw e;
}
}