Package org.openstreetmap.josm.gui.io
Class UploadDialogModel
java.lang.Object
javax.swing.table.AbstractTableModel
org.openstreetmap.josm.gui.tagging.TagEditorModel
org.openstreetmap.josm.gui.io.UploadDialogModel
- All Implemented Interfaces:
Serializable,TableModel
A model for the upload dialog
- Since:
- 18173
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.openstreetmap.josm.gui.tagging.TagEditorModel
TagEditorModel.EndEditListener -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Stringthe user-agentstatic final Stringthe "comment" changeset OSM keyprivate static final Stringthe "created_by" changeset OSM keyprivate final booleanwhether to extract hashtags from commentprivate booleana lock to prevent loopsstatic final Stringthe "source" changeset OSM keyFields inherited from class org.openstreetmap.josm.gui.tagging.TagEditorModel
PROP_DIRTY, tagsFields inherited from class javax.swing.table.AbstractTableModel
listenerList -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static StringaddHashTagsFromDataSet(String comment, DataSet dataSet) Returns the given comment with appended hashtags from dataset changeset tags, if not already present.private voidInserts/updates/deletes a tag.(package private) StringfindHashTags(String comment) Extracts the list of hashtags from the comment text.voidGet the value of a key.static booleanisCommentOrSource(String key) Determines if the key is "comment" or "source".voidInserts/updates/deletes a tag.voidInserts/updates/deletes all tags frommap.voidInserts all tags from aDataSet.Methods inherited from class org.openstreetmap.josm.gui.tagging.TagEditorModel
add, add, addPropertyChangeListener, appendNewTag, applyToPrimitive, clear, commitPendingEdit, createDeleteTagsCommand, createUpdateTagCommand, delete, deleteTagNames, deleteTags, deleteTagValues, ensureOneTag, fireDirtyStateChanged, forPrimitive, get, get, getColumnCount, getColumnSelectionModel, getKeys, getRowCount, getRowSelectionModel, getTagCollection, getTaggingPresetTypes, getTags, getTags, getValueAt, includesTag, initFromPrimitive, initFromTags, initFromTags, isCellEditable, isDirty, prepend, removePropertyChangeListener, setDirty, setEndEditListener, setValueAt, sort, updateTagName, updateTags, updateTagValueMethods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getColumnName, getListeners, getTableModelListeners, removeTableModelListener
-
Field Details
-
CREATED_BY
the "created_by" changeset OSM key- See Also:
-
COMMENT
the "comment" changeset OSM key- See Also:
-
SOURCE
the "source" changeset OSM key- See Also:
-
agent
the user-agent -
hashtags
whether to extract hashtags from comment -
locked
a lock to prevent loops
-
-
Constructor Details
-
UploadDialogModel
public UploadDialogModel()
-
-
Method Details
-
fireTableDataChanged
- Overrides:
fireTableDataChangedin classAbstractTableModel
-
getValue
Get the value of a key.- Parameters:
key- The key to retrieve- Returns:
- The value (may be null)
-
findHashTags
Extracts the list of hashtags from the comment text.- Parameters:
comment- The comment with the hashtags- Returns:
- the hashtags separated by ";" or null
-
addHashTagsFromDataSet
Returns the given comment with appended hashtags from dataset changeset tags, if not already present.- Parameters:
comment- changeset comment. Can be nulldataSet- optional dataset, which can contain hashtags in its changeset tags- Returns:
- comment with dataset changesets tags, if any, not duplicated
-
doPut
Inserts/updates/deletes a tag.Existing keys are updated. Others are added. A value of
nulldeletes the key.- Parameters:
key- The key of the tag to insert.value- The value of the tag to insert.
-
put
Inserts/updates/deletes a tag.Existing keys are updated. Others are added. A value of
nulldeletes the key.- Parameters:
key- The key of the tag to insert.value- The value of the tag to insert.
-
putAll
Inserts/updates/deletes all tags frommap.Existing keys are updated. Others are added. A value of
nulldeletes the key.- Parameters:
map- a map of tags to insert or update
-
putAll
Inserts all tags from aDataSet.- Parameters:
dataSet- The DataSet to take tags from.
-
isCommentOrSource
Determines if the key is "comment" or "source".- Parameters:
key- changeset key- Returns:
trueif the key is "comment" or "source"- Since:
- 18283
-