/** * {@inheritDoc} */ public DataType next() { throw new OsmosisRuntimeException("This iterator contains no data."); }
/** * Ensures that the object is writeable. If not an exception will be thrown. * This is intended to be called within all update methods. */ protected void assertWriteable() { if (readOnly) { throw new OsmosisRuntimeException( "The object has been marked as read-only. It must be cloned to make changes."); } }
/** * This is called by the input thread to validate that no errors have * occurred on the output thread. */ private void checkForOutputErrors() { // Check for reading thread error. if (!outputOkay) { throw new OsmosisRuntimeException("An output error has occurred, aborting."); } }
/** * {@inheritDoc} */ public Sink getSink(int instance) { if (instance != 0) { throw new OsmosisRuntimeException("Sink instance " + instance + " is not valid."); } return sortedEntityValidator; }
/** * {@inheritDoc} */ public ChangeSink getChangeSink(int instance) { if (instance != 0) { throw new OsmosisRuntimeException("Change sink instance " + instance + " is not valid."); } return sortedChangeValidator; }
/** * {@inheritDoc} */ public Sink getSink(int instance) { if (instance != 0) { throw new OsmosisRuntimeException("Sink instance " + instance + " is not valid."); } return sortedEntityValidator; }
/** * This is called by the input thread to validate that no errors have * occurred on the output thread. */ private void checkForOutputErrors() { // Check for reading thread error. if (!outputOkay) { throw new OsmosisRuntimeException("An output error has occurred, aborting."); } }
/** * {@inheritDoc} */ public DataType next() { throw new OsmosisRuntimeException("This iterator contains no data."); }
/** * This is called by the output thread to validate that no errors have * occurred on the input thread. */ private void checkForInputErrors() { // Check for writing thread error. if (!inputOkay) { throw new OsmosisRuntimeException("An input error has occurred, aborting."); } }
/** * Ensures that the object is writeable. If not an exception will be thrown. * This is intended to be called within all update methods. */ protected void assertWriteable() { if (readOnly) { throw new OsmosisRuntimeException( "The object has been marked as read-only. It must be cloned to make changes."); } }
/** * This is called by the output thread to validate that no errors have * occurred on the input thread. */ private void checkForInputErrors() { // Check for writing thread error. if (!inputOkay) { throw new OsmosisRuntimeException("An input error has occurred, aborting."); } }
/** * {@inheritDoc} */ public ChangeSink getChangeSink(int instance) { if (instance != 0) { throw new OsmosisRuntimeException("Change sink instance " + instance + " is not valid."); } return sortedChangeValidator; }
/** * {@inheritDoc} */ public ChangeSink getChangeSink(int instance) { // Determine which postbox should be written to. switch (instance) { case 0: return sortedChangeValidator0; case 1: return sortedChangeValidator1; default: throw new OsmosisRuntimeException("Sink instance " + instance + " is not valid."); } }
private OsmosisRuntimeException createUnknownDbTypeException() { return new OsmosisRuntimeException("Unknown database type " + dbType + "."); }
/** * {@inheritDoc} */ public Sink getSink(int instance) { switch (instance) { case 0: return fromSink; case 1: return toSink; default: throw new OsmosisRuntimeException("Sink instance " + instance + " is not valid."); } }
/** * {@inheritDoc} */ public Sink getSink(int instance) { // Determine which postbox should be written to. switch (instance) { case 0: return sortedEntityValidator0; case 1: return sortedEntityValidator1; default: throw new OsmosisRuntimeException("Sink instance " + instance + " is not valid."); } }
/** * {@inheritDoc} */ public ChangeSink getChangeSink(int instance) { // Determine which postbox should be written to. switch (instance) { case 0: return sortedChangeValidator0; case 1: return sortedChangeValidator1; default: throw new OsmosisRuntimeException("Sink instance " + instance + " is not valid."); } }
/** * {@inheritDoc} */ public Sink getSink(int instance) { switch (instance) { case 0: return fromSink; case 1: return toSink; default: throw new OsmosisRuntimeException("Sink instance " + instance + " is not valid."); } }
private OsmosisRuntimeException createUnknownDbTypeException() { return new OsmosisRuntimeException("Unknown database type " + dbType + "."); }
/** * {@inheritDoc} */ @Override protected void processInitializeState(ReplicationState initialState) { // We don't allow automatic state file initialization for replication // downloading. This is the most common task used by end users to // retrieve replication information. It is very rare that a user would // want to begin from the latest server state file. In most cases // they'll want to begin processing from a known point in time. throw new OsmosisRuntimeException("The local state.txt file doesn't exist." + " See http://wiki.openstreetmap.org/wiki/Osmosis/Detailed_Usage" + "#--read-replication-interval-init_.28--rrii.29" + " for more details on how to create the state.txt file."); }