<commit_before>/*
 * ******************************************************************************
 *   Copyright 2014 Spectra Logic Corporation. All Rights Reserved.
 *   Licensed under the Apache License, Version 2.0 (the "License"). You may not use
 *   this file except in compliance with the License. A copy of the License is located at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 *   or in the "license" file accompanying this file.
 *   This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 *   CONDITIONS OF ANY KIND, either express or implied. See the License for the
 *   specific language governing permissions and limitations under the License.
 * ****************************************************************************
 */

package com.spectralogic.ds3client.commands;

import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;

import org.apache.http.entity.ContentType;

import com.spectralogic.ds3client.models.Checksum;

abstract class AbstractRequest implements Ds3Request {

    private final Map<String, String> headers = new HashMap<>();
    private final Map<String, String> queryParams = new HashMap<>();

    @Override
    public ContentType getContentType() {
        return ContentType.APPLICATION_XML;
    }

    @Override
    public InputStream getStream() {
        return null;
    }

    @Override
    public long getSize() {
        return 0;
    }

    @Override
    public Checksum getChecksum() {
        return Checksum.none();
    }

    @Override
    public final Map<String, String> getQueryParams() {
        return this.queryParams;
    }

    @Override<commit_msg>Added the explicit naming convention header.<commit_after>/*
 * ******************************************************************************
 *   Copyright 2014 Spectra Logic Corporation. All Rights Reserved.
 *   Licensed under the Apache License, Version 2.0 (the "License"). You may not use
 *   this file except in compliance with the License. A copy of the License is located at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 *   or in the "license" file accompanying this file.
 *   This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 *   CONDITIONS OF ANY KIND, either express or implied. See the License for the
 *   specific language governing permissions and limitations under the License.
 * ****************************************************************************
 */

package com.spectralogic.ds3client.commands;

import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;

import org.apache.http.entity.ContentType;

import com.spectralogic.ds3client.models.Checksum;

abstract class AbstractRequest implements Ds3Request {

    private final Map<String, String> headers = buildDefaultHeaders();
    private final Map<String, String> queryParams = new HashMap<>();
    
    private static Map<String, String> buildDefaultHeaders() {
        final Map<String, String> headers = new HashMap<>();
        headers.put("Naming-Convention", "s3");
        return headers;
    }

    @Override
    public ContentType getContentType() {
        return ContentType.APPLICATION_XML;
    }

    @Override
    public InputStream getStream() {
        return null;
    }

    @Override
    public long getSize() {
        return 0;
    }

    @Override
    public Checksum getChecksum() {
        return Checksum.none();
    }

    @Override
    public final Map<String, String> getQueryParams() {
        return this.queryParams;
    }

    @Override
{'fraction_non_alphanumeric': 0.16591676040494938, 'fraction_numerical': 0.00703037120359955, 'mean_word_length': 3.508238276299113, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '259681', 'n_tokens_mistral': 919, 'n_tokens_neox': 889, 'n_words': 308}