org.openstreetmap.josm.io
Class OsmApiPrimitiveGoneException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.openstreetmap.josm.io.OsmTransferException
              extended by org.openstreetmap.josm.io.OsmApiException
                  extended by org.openstreetmap.josm.io.OsmApiPrimitiveGoneException
All Implemented Interfaces:
java.io.Serializable

public class OsmApiPrimitiveGoneException
extends OsmApiException

Represents an exception thrown by the OSM API if JOSM tries to update or delete a primitive which is already deleted on the server.

See Also:
Serialized Form

Field Summary
static java.lang.String ERROR_HEADER_PATTERN
          The regexp pattern for the error header replied by the OSM API
private  long id
          the id of the primitive
private  OsmPrimitiveType type
          the type of the primitive which is gone on the server
 
Constructor Summary
OsmApiPrimitiveGoneException(java.lang.String errorHeader, java.lang.String errorBody)
           
 
Method Summary
 long getPrimitiveId()
          Replies the id of the primitive this exception was thrown for.
 OsmPrimitiveType getPrimitiveType()
          Replies the type of the primitive this exception was thrown for.
 boolean isKnownPrimitive()
          Replies true if we know what primitive this exception was thrown for
 
Methods inherited from class org.openstreetmap.josm.io.OsmApiException
getAccessedUrl, getDisplayMessage, getErrorBody, getErrorHeader, getMessage, getResponseCode, setAccessedUrl, setErrorBody, setErrorHeader, setResponseCode
 
Methods inherited from class org.openstreetmap.josm.io.OsmTransferException
getUrl, setUrl
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ERROR_HEADER_PATTERN

public static final java.lang.String ERROR_HEADER_PATTERN
The regexp pattern for the error header replied by the OSM API

See Also:
Constant Field Values

type

private OsmPrimitiveType type
the type of the primitive which is gone on the server


id

private long id
the id of the primitive

Constructor Detail

OsmApiPrimitiveGoneException

public OsmApiPrimitiveGoneException(java.lang.String errorHeader,
                                    java.lang.String errorBody)
Method Detail

isKnownPrimitive

public boolean isKnownPrimitive()
Replies true if we know what primitive this exception was thrown for

Returns:
true if we know what primitive this exception was thrown for

getPrimitiveType

public OsmPrimitiveType getPrimitiveType()
Replies the type of the primitive this exception was thrown for. null, if the type is not known.

Returns:
the type of the primitive this exception was thrown for

getPrimitiveId

public long getPrimitiveId()
Replies the id of the primitive this exception was thrown for. 0, if the id is not known.

Returns:
the id of the primitive this exception was thrown for


JOSM