本文整理匯總了Java中com.vividsolutions.jts.io.ParseException.getMessage方法的典型用法代碼示例。如果您正苦於以下問題:Java ParseException.getMessage方法的具體用法?Java ParseException.getMessage怎麽用?Java ParseException.getMessage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.vividsolutions.jts.io.ParseException
的用法示例。
在下文中一共展示了ParseException.getMessage方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: doEvaluate
import com.vividsolutions.jts.io.ParseException; //導入方法依賴的package包/類
@Override
protected void doEvaluate(TExecutionContext context, LazyList<? extends ValueSource> inputs, ValueTarget output) {
String wkt = inputs.get(0).getString();
WKTReader reader = (WKTReader)context.preptimeObjectAt(READER_CONTEXT_POS);
try {
Geometry geometry = reader.read(wkt);
output.putObject(geometry);
} catch(ParseException e) {
throw new InvalidSpatialObjectException(e.getMessage());
}
}
示例2: doEvaluate
import com.vividsolutions.jts.io.ParseException; //導入方法依賴的package包/類
@Override
protected void doEvaluate(TExecutionContext context, LazyList<? extends ValueSource> inputs, ValueTarget output) {
byte[] data = new byte[0];
if (inputs.get(0).hasAnyValue()) {
Object o = inputs.get(0).getObject();
if (o instanceof BlobRef) {
BlobRef blob;
blob = (BlobRef) o;
String mode = context.getQueryContext().getStore().getConfig().getProperty(AkBlob.RETURN_UNWRAPPED);
if (mode.equalsIgnoreCase(AkBlob.UNWRAPPED)){
data = blob.getBytes();
}
else {
if (blob.isShortLob()) {
data = blob.getBytes();
} else {
LobService ls = context.getQueryContext().getServiceManager().getServiceByClass(LobService.class);
data = ls.readBlob(context.getQueryContext().getSession(), blob.getId());
}
}
} else if (o instanceof byte[]) {
data = (byte[])o;
}
}
WKBReader reader = (WKBReader)context.preptimeObjectAt(READER_CONTEXT_POS);
try {
Geometry geometry = reader.read(data);
output.putObject(geometry);
} catch(ParseException e) {
throw new InvalidSpatialObjectException(e.getMessage());
}
}