Package org.openstreetmap.osmosis.core

Examples of org.openstreetmap.osmosis.core.OsmosisRuntimeException


      throw new NullPointerException("The user name cannot be null.");
    }
   
    // Disallow a user to be created with the "NONE" id.
    if (NONE != null && id == USER_ID_NONE) {
      throw new OsmosisRuntimeException("A user id of " + USER_ID_NONE + " is not permitted.");
    }
   
    this.name = userName;
    this.id = id;
  }
View Full Code Here


      if (action.equals(ChangeAction.Delete)) {
        return 9;
      }
    }
   
    throw new OsmosisRuntimeException(
      "The change entity with action " + action
      + " type " + entity.getType()
      + " and id " + entity.getId()
      + " was not recognised."
    );
View Full Code Here

   *            The maximum number of objects to hold in the postbox before
   *            blocking.
   */
  public DataPostbox(int capacity) {
    if (capacity <= 0) {
      throw new OsmosisRuntimeException("A capacity of " + capacity + " is invalid, must be greater than 0.");
    }

    this.bufferCapacity = capacity;

    // Use a chunk size one quarter of total buffer size. This is a magic
View Full Code Here

   * occurred on the output thread.
   */
  private void checkForOutputErrors() {
    // Check for reading thread error.
    if (!outputOkay) {
      throw new OsmosisRuntimeException("An output error has occurred, aborting.");
    }
  }
View Full Code Here

   * occurred on the input thread.
   */
  private void checkForInputErrors() {
    // Check for writing thread error.
    if (!inputOkay) {
      throw new OsmosisRuntimeException("An input error has occurred, aborting.");
    }
  }
View Full Code Here

    case 0:
      return sortedEntityValidator0;
    case 1:
      return sortedEntityValidator1;
    default:
      throw new OsmosisRuntimeException("Sink instance " + instance
          + " is not valid.");
    }
  }
View Full Code Here

  private void waitForUpdate() {
    try {
      dataWaitCondition.await();

    } catch (InterruptedException e) {
      throw new OsmosisRuntimeException("Thread was interrupted.", e);
    }
  }
View Full Code Here

              // If both have identical versions, use the second source.
              sink.process(entityContainer1);
            }

          } else {
            throw new OsmosisRuntimeException(
                "Conflict resolution method " + conflictResolutionMethod + " is not recognized.");
          }
         
          entityContainer0 = null;
          entityContainer1 = null;
View Full Code Here

   * {@inheritDoc}
   */
  @Override
  public void initialize(Map<String, Object> metaData) {
    if (inputInitialized) {
      throw new OsmosisRuntimeException("initialize has already been called");
    }
   
    lock.lock();

    try {
View Full Code Here

   
    // Now actually log or fail.
    if (boundRemovedAction == BoundRemovedAction.Warn) {
      LOG.warning(message);
    } else if (boundRemovedAction == BoundRemovedAction.Fail) {
      throw new OsmosisRuntimeException(message);
    }
  }
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.