Package org.openstreetmap.osmosis.core

Examples of org.openstreetmap.osmosis.core.OsmosisRuntimeException


 
  private double getRequiredDoubleValue(String attributeName) {
    String valueString = reader.getAttributeValue(null, attributeName);

    if (valueString == null) {
      throw new OsmosisRuntimeException(String.format(
          "Required attribute %s of the bounds element is missing", attributeName));
    }
    try {
      return Double.parseDouble(valueString);
    } catch (NumberFormatException e) {
      throw new OsmosisRuntimeException(
          String.format("Cannot parse the %s attribute of the bounds element", attributeName),
          e);
    }
  }
View Full Code Here


      } else {
        throw new XMLStreamException();
      }
    } catch (Exception e) {
      throw new OsmosisRuntimeException(e);
    }
  }
View Full Code Here

      } else {
        writer.write("f");
      }
     
    } catch (IOException e) {
      throw new OsmosisRuntimeException("Unable to write value (" + data + ")", e);
    }
  }
View Full Code Here

      separateField();
     
      writer.write(Integer.toString(data));
     
    } catch (IOException e) {
      throw new OsmosisRuntimeException("Unable to write value (" + data + ")", e);
    }
  }
View Full Code Here

      separateField();
     
      writer.write(Long.toString(data));
     
    } catch (IOException e) {
      throw new OsmosisRuntimeException("Unable to write value (" + data + ")", e);
    }
  }
View Full Code Here

   * Performs any validation and pre-processing required for all entity types.
   */
  private void processEntityPrerequisites(Entity entity) {
    // We can't write an entity with a null timestamp.
    if (entity.getTimestamp() == null) {
      throw new OsmosisRuntimeException("Entity(" + entity.getType()
          + ") " + entity.getId() + " does not have a timestamp set.");
    }
   
    // Process the user data.
    writeUser(entity.getUser());
View Full Code Here

      separateField();
     
      writer.write(escapeString(data));
     
    } catch (IOException e) {
      throw new OsmosisRuntimeException("Unable to write value (" + data + ")", e);
    }
  }
View Full Code Here

    try {
      updateStatement = statementContainer.add(dbCtx.prepareCall("{call osmosisUpdate()}"));
      updateStatement.executeUpdate();
     
    } catch (SQLException e) {
      throw new OsmosisRuntimeException("Unable to invoke the osmosis update stored function.", e);
    } finally {
      statementContainer.release();
    }
   
    // Clear all action records.
View Full Code Here

      separateField();
     
      writer.write(dateFormat.format(data));
     
    } catch (IOException e) {
      throw new OsmosisRuntimeException("Unable to write value (" + data + ")", e);
    }
  }
View Full Code Here

            } else
          writer.write(postgisBinaryWriter.writeHexed(data));
            }
     
    } catch (IOException e) {
      throw new OsmosisRuntimeException("Unable to write value (" + data + ")", e);
    }
  }
View Full Code Here

TOP

Related Classes of org.openstreetmap.osmosis.core.OsmosisRuntimeException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.