Package org.openstreetmap.josm.io
Class OsmApiPrimitiveGoneException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.openstreetmap.josm.io.OsmTransferException
-
- org.openstreetmap.josm.io.OsmApiException
-
- 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.- Since:
- 2198
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringERROR_HEADER_PATTERNThe regexp pattern for the error header replied by the OSM APIprivate longidthe id of the primitiveprivate OsmPrimitiveTypetypethe type of the primitive which is gone on the server
-
Constructor Summary
Constructors Constructor Description OsmApiPrimitiveGoneException(java.lang.String errorHeader, java.lang.String errorBody)Constructs a newOsmApiPrimitiveGoneException.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetPrimitiveId()Replies the id of the primitive this exception was thrown for.OsmPrimitiveTypegetPrimitiveType()Replies the type of the primitive this exception was thrown for.booleanisKnownPrimitive()Replies true if we know what primitive this exception was thrown for-
Methods inherited from class org.openstreetmap.josm.io.OsmApiException
getAccessedUrl, getContentType, getDisplayMessage, getErrorBody, getErrorHeader, getLogin, getMessage, getResponseCode, isHtml, setAccessedUrl, setContentType, setErrorBody, setErrorHeader, setLogin, setResponseCode
-
Methods inherited from class org.openstreetmap.josm.io.OsmTransferException
getUrl, setUrl
-
-
-
-
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 final OsmPrimitiveType type
the type of the primitive which is gone on the server
-
id
private final long id
the id of the primitive
-
-
Constructor Detail
-
OsmApiPrimitiveGoneException
public OsmApiPrimitiveGoneException(java.lang.String errorHeader, java.lang.String errorBody)
Constructs a newOsmApiPrimitiveGoneException.- Parameters:
errorHeader- error headererrorBody- error body
-
-
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
-
-