} catch (SchemaException ex) { throw new DataSourceException( "Some requested attributes do not match the table schema: " + ex.getMessage(), ex);
public SimpleFeatureType getQueryType(Query query) throws IOException { final String typeName = query.getTypeName(); final String propertyNames[] = query.getPropertyNames(); final FeatureTypeInfo typeInfo = typeInfoCache.getFeatureTypeInfo(typeName); final SimpleFeatureType completeSchema = typeInfo.getFeatureType(); SimpleFeatureType featureType = completeSchema; if (!query.retrieveAllProperties() || query.getCoordinateSystem() != null) { try { featureType = DataUtilities.createSubType( featureType, propertyNames, query.getCoordinateSystem()); } catch (SchemaException e) { LOGGER.log(Level.FINEST, e.getMessage(), e); throw new DataSourceException("Could not create Feature Type for query", e); } } return featureType; }
} catch (SchemaException e) { throw new RuntimeException( "Schema missmatch, should never happen!: " + e.getMessage(), e);
private Reader(MIFFileTokenizer mifTokenizer, MIFFileTokenizer midTokenizer) throws IOException { inputBuffer = new Object[numAttribs]; mif = mifTokenizer; mid = midTokenizer; // numAttribs == 0 when Reader is called from within readMifHeader for determining geometry Type if (numAttribs > 0) { try { fieldValueSetters = getValueSetters(); } catch (SchemaException e) { throw new IOException(e.getMessage()); } inputFeature = readFeature(); } }
private Writer(PrintStream mif, PrintStream mid, boolean append) throws IOException { innerReader = getFeatureReader(); try { fieldValueSetters = getValueSetters(); } catch (SchemaException e) { throw new IOException(e.getMessage()); } outMif = mif; outMid = mid; try { if (!append) { outMif.println(exportHeader()); } } catch (Exception e) { outMif = null; outMid = null; throw new IOException(e.getMessage()); } }
Reader(final MIFFileTokenizer _mifTokenizer, final MIFFileTokenizer _midTokenizer) throws IOException { inputBuffer_ = new Object[numAttribs_]; mif_ = _mifTokenizer; mid_ = _midTokenizer; // numAttribs == 0 when Reader is called from within readMifHeader for determining geometry Type if (numAttribs_ > 0) { try { fieldValueSetters_ = getValueSetters(); } catch (final SchemaException e) { throw new IOException(e.getMessage()); } inputFeature_ = readFeature(); } }
Writer(final PrintStream _mif, final PrintStream _mid, boolean _append) throws IOException { if (mifFile_.exists()) { innerReader_ = getFeatureReader(); } try { fieldValueSetters_ = getValueSetters(); } catch (final SchemaException e) { throw new IOException(e.getMessage()); } outMif_ = _mif; outMid_ = _mid; try { if (!_append || !MIFFile.this.mifFile_.exists() || MIFFile.this.mifFile_.length() == 0) { outMif_.println(exportHeader()); } } catch (final Exception e) { outMif_ = null; outMid_ = null; throw new IOException(e.getMessage()); } }
public FeatureCollection open(final InputStream _in) throws IOException{ if (gmlInput_ == null) { return null; } try { final InputStreamReader inputStreamReader = new InputStreamReader(_in, CtuluLibFile.getUTF8Charset()); return read(new BufferedReader(inputStreamReader), "inputStream"); } catch (final ParseException _evt) { FuLog.error(_evt); throw new IOException(_evt.getMessage()); } catch (final SchemaException _evt) { FuLog.error(_evt); throw new IOException(_evt.getMessage()); } finally {} }
} catch (SchemaException ex) { throw new DataSourceException( "Some requested attributes do not match the table schema: " + ex.getMessage(), ex);
LOGGER.log(Level.FINER, e.getMessage(), e); } catch (SchemaException e) { LOGGER.log(Level.FINER, e.getMessage(), e);
public FeatureCollection open(final File _f) throws IOException { final GMLInputTemplate input = getInputTemplate(_f); if (input == null) { return null; } setInputTemplate(input); InputStreamReader inputStreamReader = null; try { inputStreamReader = new InputStreamReader(getInputStream(_f), CtuluLibFile.getUTF8Charset()); return read(new BufferedReader(inputStreamReader), _f.getName()); } catch (final ParseException _evt) { FuLog.error(_evt); throw new IOException(_evt.getMessage()); } catch (final SchemaException _evt) { FuLog.error(_evt); throw new IOException(_evt.getMessage()); } finally { if (inputStreamReader != null) { inputStreamReader.close(); } } }
private void initRead() throws IOException { if (!init_) { init_ = true; try { final GMLReader reader = new GMLReader(); final FeatureCollection collection = reader.open(f_); if (collection != null) { it_ = collection.features(); } else { it_ = null; } type_ = reader.gmlInput_.toFeatureSchema(); } catch (final SAXException _evt) { FuLog.error(_evt); throw new IOException(_evt.getMessage()); } catch (final ParseException _evt) { FuLog.error(_evt); throw new IOException(_evt.getMessage()); } catch (final SchemaException _evt) { FuLog.error(_evt); throw new IOException(_evt.getMessage()); } } }
LOGGER.warning(e.getMessage()); } catch (SchemaException e) { LOGGER.warning(e.getMessage());
BeamLogManager.getSystemLogger().warning("Cannot create line/polygon geometry: " + e.getMessage() + " --> Will interpret points as they are."); return featureCollection;
public SimpleFeatureType getQueryType(Query query) throws IOException { final String typeName = query.getTypeName(); final String propertyNames[] = query.getPropertyNames(); final FeatureTypeInfo typeInfo = typeInfoCache.getFeatureTypeInfo(typeName); final SimpleFeatureType completeSchema = typeInfo.getFeatureType(); SimpleFeatureType featureType = completeSchema; if (!query.retrieveAllProperties() || query.getCoordinateSystem() != null) { try { featureType = DataUtilities.createSubType(featureType, propertyNames, query.getCoordinateSystem()); } catch (SchemaException e) { LOGGER.log(Level.FINEST, e.getMessage(), e); throw new DataSourceException("Could not create Feature Type for query", e); } } return featureType; }
featureType = DataUtilities.createSubType( featureType, propertyNames, query.getCoordinateSystem() ); } catch (SchemaException e) { LOGGER.log( Level.FINEST, e.getMessage(), e); throw new DataSourceException( "Could not create Feature Type for query", e );
featureType = DataUtilities.createSubType( featureType, propertyNames, query.getCoordinateSystem() ); } catch (SchemaException e) { LOGGER.log( Level.FINEST, e.getMessage(), e); throw new DataSourceException( "Could not create Feature Type for query", e );
LOGGER.log( Level.FINEST, e.getMessage(), e); throw new DataSourceException( "Could not create Feature Type for query", e );
reader = sdeReader; } catch (SchemaException e) { throw new RuntimeException("Schema missmatch, should never happen!: " + e.getMessage(), e);
featureType = DataUtilities.createSubType( featureType, propertyNames, query.getCoordinateSystem() ); } catch (SchemaException e) { LOGGER.log( Level.FINEST, e.getMessage(), e); throw new DataSourceException( "Could not create Feature Type for query", e );