// .getTagsContainer().getTag(TagName.Outlier), workspace
// .getSemanticTypeModelHandler(), workspace.getOntologyManager());
// }
OntologyManager om= workspace.getOntologyManager();
WorksheetToFeatureCollection geo = new WorksheetToFeatureCollection(worksheet, om, selection);//ying
//WorksheetToFeatureCollections geo = new WorksheetToFeatureCollections(worksheet);
// Send an error update if no geospatial data found!
if (geo.hasNoGeospatialData()) {
return new UpdateContainer(new ErrorUpdate(
"No geospatial data found in the worksheet!"));
}
try {
//final File file = geo.SaveSpatialData();
// Transfer the file to a public server
final String kmlFileName = geo.SaveSpatialDataAndReturnKMLString();//new RandomGUID().toString(); // save this line for using networkLink in GE plugin (see geospatial.js)
final String zippedSpatialDataPath = geo.getZippedSpatialDataPath();
final boolean transfer = true;//transferFileToPublicServer(kmlFileName,file); // save this line for using networkLink in GE plugin (see geospatial.js)
//if (!transfer) { // save this line for using networkLink in GE plugin (see geospatial.js)
// logger.error("Published KML file could not be moved to a public server to display on Google Maps!");
//}