Class UploadDialogModel

    • Field Detail

      • agent

        private final java.lang.String agent
        the user-agent
      • hashtags

        private final boolean hashtags
        whether to extract hashtags from comment
      • locked

        private boolean locked
        a lock to prevent loops
    • Method Detail

      • fireTableDataChanged

        public void fireTableDataChanged()
        Overrides:
        fireTableDataChanged in class javax.swing.table.AbstractTableModel
      • getValue

        public java.lang.String getValue​(java.lang.String key)
        Get the value of a key.
        Parameters:
        key - The key to retrieve
        Returns:
        The value (may be null)
      • findHashTags

        java.lang.String findHashTags​(java.lang.String comment)
        Extracts the list of hashtags from the comment text.
        Parameters:
        comment - The comment with the hashtags
        Returns:
        the hashtags separated by ";" or null
      • addHashTagsFromDataSet

        static java.lang.String addHashTagsFromDataSet​(java.lang.String comment,
                                                       DataSet dataSet)
        Returns the given comment with appended hashtags from dataset changeset tags, if not already present.
        Parameters:
        comment - changeset comment. Can be null
        dataSet - optional dataset, which can contain hashtags in its changeset tags
        Returns:
        comment with dataset changesets tags, if any, not duplicated
      • doPut

        private void doPut​(java.lang.String key,
                           java.lang.String value)
        Inserts/updates/deletes a tag.

        Existing keys are updated. Others are added. A value of null deletes the key.

        Parameters:
        key - The key of the tag to insert.
        value - The value of the tag to insert.
      • put

        public void put​(java.lang.String key,
                        java.lang.String value)
        Inserts/updates/deletes a tag.

        Existing keys are updated. Others are added. A value of null deletes the key.

        Parameters:
        key - The key of the tag to insert.
        value - The value of the tag to insert.
      • putAll

        public void putAll​(java.util.Map<java.lang.String,​java.lang.String> map)
        Inserts/updates/deletes all tags from map.

        Existing keys are updated. Others are added. A value of null deletes the key.

        Parameters:
        map - a map of tags to insert or update
      • putAll

        public void putAll​(DataSet dataSet)
        Inserts all tags from a DataSet.
        Parameters:
        dataSet - The DataSet to take tags from.
      • isCommentOrSource

        public static boolean isCommentOrSource​(java.lang.String key)
        Determines if the key is "comment" or "source".
        Parameters:
        key - changeset key
        Returns:
        true if the key is "comment" or "source"
        Since:
        18283