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:
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 String
ERROR_HEADER_PATTERN
The regexp pattern for the error header replied by the OSM APIprivate long
id
the id of the primitiveprivate OsmPrimitiveType
type
the type of the primitive which is gone on the server
-
Constructor Summary
Constructors Constructor Description OsmApiPrimitiveGoneException(String errorHeader, String errorBody)
Constructs a newOsmApiPrimitiveGoneException
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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, 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
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Field Detail
-
ERROR_HEADER_PATTERN
public static final 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(String errorHeader, 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
-
-