public abstract class PrimitiveData extends AbstractPrimitive implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
private static long |
serialVersionUID |
changesetId, FLAG_ANNOTATED, FLAG_DELETED, FLAG_DIRECTION_REVERSED, FLAG_DISABLED, FLAG_DISABLED_TYPE, FLAG_HAS_DIRECTIONS, FLAG_HIDDEN_TYPE, FLAG_HIDE_IF_DISABLED, FLAG_HIGHLIGHTED, FLAG_INCOMPLETE, FLAG_MODIFIED, FLAG_PRESERVED, FLAG_TAGGED, FLAG_VISIBLE, flags, id, keys, timestamp, user, versionMAX_TAG_LENGTH| Constructor and Description |
|---|
PrimitiveData()
Constructs a new
PrimitiveData. |
PrimitiveData(long id)
Constructs a new
PrimitiveData with given id. |
PrimitiveData(PrimitiveData data)
Constructs a new
PrimitiveData from an existing one. |
| Modifier and Type | Method and Description |
|---|---|
void |
declareCachedStyleUpToDate()
Declare that the cached style for this primitive is up to date.
|
StyleCache |
getCachedStyle()
Returns the cached style.
|
static <T extends PrimitiveData> |
getFilteredList(java.util.Collection<T> list,
OsmPrimitiveType type)
Returns a filtered list for a given primitive type.
|
boolean |
hasDirectionKeys()
true if this object has direction dependent tags (e.g.
|
boolean |
isAnnotated()
Determines if this object is considered "annotated".
|
boolean |
isCachedStyleUpToDate()
Check if the cached style for this primitive is up to date.
|
boolean |
isHighlighted()
Checks if the highlight flag for this primitive was set
|
boolean |
isTagged()
Determines if this object is considered "tagged".
|
protected void |
keysChangedImpl(java.util.Map<java.lang.String,java.lang.String> originalKeys)
What to do, when the tags have changed by one of the tag-changing methods.
|
abstract PrimitiveData |
makeCopy()
Returns a copy of this primitive data.
|
private void |
readObject(java.io.ObjectInputStream ois) |
boolean |
reversedDirection()
true if this object has the "reversed direction" flag enabled
|
void |
setCachedStyle(StyleCache mappaintStyle)
Sets the cached style.
|
void |
setHighlighted(boolean highlighted)
Updates the highlight flag for this primitive.
|
void |
setId(long id)
Sets the primitive identifier.
|
void |
setIncomplete(boolean incomplete)
override to make it public
|
void |
setVersion(int version)
Sets the primitive version.
|
java.lang.String |
toString() |
private void |
writeObject(java.io.ObjectOutputStream oos) |
advanceUniqueId, clearOsmMetadata, cloneFrom, currentUniqueId, generateUniqueId, get, getChangesetId, getFlagsAsString, getId, getIgnoreCase, getKeys, getLocalName, getName, getNumKeys, getPrimitiveId, getRawTimestamp, getTimestamp, getUniqueId, getUser, getVersion, hasKey, hasKey, hasKeys, isDeleted, isIncomplete, isKeyFalse, isKeyTrue, isModified, isNew, isNewOrUndeleted, isTimestampEmpty, isUndeleted, isUsable, isVisible, keySet, put, remove, removeAll, setChangesetId, setDeleted, setKeys, setKeys, setModified, setOsmId, setRawTimestamp, setTimestamp, setUser, setVisible, updateFlags, visitKeysclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaccept, getDisplayName, getDisplayType, isDisabled, isDisabledAndHidden, isDrawable, isMemberOfSelected, isMultipolygon, isOuterMemberOfSelected, isSelectable, isSelectedhasTag, hasTag, hasTag, hasTag, hasTagDifferent, hasTagDifferent, hasTagDifferent, putgetTypeclearCachedStyleprivate static final long serialVersionUID
public PrimitiveData()
PrimitiveData.public PrimitiveData(long id)
PrimitiveData with given id.id - idpublic PrimitiveData(PrimitiveData data)
PrimitiveData from an existing one.data - the data to copypublic void setId(long id)
id - primitive identifierpublic void setVersion(int version)
version - primitive versionpublic void setIncomplete(boolean incomplete)
setIncomplete in class AbstractPrimitiveincomplete - incomplete flag valuepublic abstract PrimitiveData makeCopy()
public java.lang.String toString()
toString in class java.lang.Objectpublic static <T extends PrimitiveData> java.util.List<T> getFilteredList(java.util.Collection<T> list, OsmPrimitiveType type)
T - primitive typelist - list to filtertype - primitive typeprotected final void keysChangedImpl(java.util.Map<java.lang.String,java.lang.String> originalKeys)
AbstractPrimitivekeysChangedImpl in class AbstractPrimitiveoriginalKeys - original tagsprivate void writeObject(java.io.ObjectOutputStream oos) throws java.io.IOException
java.io.IOExceptionprivate void readObject(java.io.ObjectInputStream ois) throws java.lang.ClassNotFoundException, java.io.IOException
java.lang.ClassNotFoundExceptionjava.io.IOExceptionpublic boolean isTagged()
IPrimitiveisTagged in interface IPrimitivepublic boolean isAnnotated()
IPrimitiveisAnnotated in interface IPrimitivepublic boolean hasDirectionKeys()
IPrimitivehasDirectionKeys in interface IPrimitivetrue if this object has direction dependent tagspublic boolean reversedDirection()
IPrimitivereversedDirection in interface IPrimitivetrue if this object has the "reversed direction" flag enabledpublic void setHighlighted(boolean highlighted)
IPrimitivesetHighlighted in interface IPrimitivehighlighted - The new highlight flag.public boolean isHighlighted()
IPrimitiveisHighlighted in interface IPrimitivepublic StyleCache getCachedStyle()
StylablegetCachedStyle in interface Stylablepublic void setCachedStyle(StyleCache mappaintStyle)
StylablesetCachedStyle in interface StylablemappaintStyle - the cached stylepublic boolean isCachedStyleUpToDate()
StylableisCachedStyleUpToDate in interface Stylablepublic void declareCachedStyleUpToDate()
StylabledeclareCachedStyleUpToDate in interface Stylable