<commit_before>/*
 * Copyright (C) 2013 ickStream GmbH
 * All rights reserved
 */

package com.ickstream.protocol.service.core;

import com.ickstream.common.jsonrpc.MessageLogger;
import com.ickstream.protocol.common.ServiceFactory;

/**
 * Factory which should be used to get client classes for {@link CoreService} or {@link PublicCoreService}
 */
public class CoreServiceFactory extends ServiceFactory {
    private static final String CORESERVICE_ENDPOINT = "http://api.ickstream.com/ickstream-cloud-core/jsonrpc";
    private static final String PUBLICCORESERVICE_ENDPOINT = "http://api.ickstream.com/ickstream-cloud-core/public/jsonrpc";

    /**
     * Get endpoint of Cloud Core service
     *
     * @return The endpoint URL of Cloud Core service
     */
    public static String getCoreServiceEndpoint() {
        String url = System.getProperty("ickstream-core-url");
        if (url != null) {
            return url;
        } else {
            return CORESERVICE_ENDPOINT;
        }
    }

    private static String getPublicEndpoint() {
        String url = System.getProperty("ickstream-core-public-url");
        if (url != null) {
            return url;
        } else {
            return PUBLICCORESERVICE_ENDPOINT;
        }
    }

    /**
     * Get a Cloud Core client and configure it to use the specified access token and message logger<commit_msg>Changed to https url to cloud core service<commit_after>/*
 * Copyright (C) 2013 ickStream GmbH
 * All rights reserved
 */

package com.ickstream.protocol.service.core;

import com.ickstream.common.jsonrpc.MessageLogger;
import com.ickstream.protocol.common.ServiceFactory;

/**
 * Factory which should be used to get client classes for {@link CoreService} or {@link PublicCoreService}
 */
public class CoreServiceFactory extends ServiceFactory {
    private static final String CORESERVICE_ENDPOINT = "https://api.ickstream.com/ickstream-cloud-core/jsonrpc";
    private static final String PUBLICCORESERVICE_ENDPOINT = "https://api.ickstream.com/ickstream-cloud-core/public/jsonrpc";

    /**
     * Get endpoint of Cloud Core service
     *
     * @return The endpoint URL of Cloud Core service
     */
    public static String getCoreServiceEndpoint() {
        String url = System.getProperty("ickstream-core-url");
        if (url != null) {
            return url;
        } else {
            return CORESERVICE_ENDPOINT;
        }
    }

    private static String getPublicEndpoint() {
        String url = System.getProperty("ickstream-core-public-url");
        if (url != null) {
            return url;
        } else {
            return PUBLICCORESERVICE_ENDPOINT;
        }
    }

    /**
     * Get a Cloud Core client and configure it to use the specified access token and message logger
{'fraction_non_alphanumeric': 0.0906801007556675, 'fraction_numerical': 0.0028787333573227778, 'mean_word_length': 2.797814207650273, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, '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': '5567818', 'n_tokens_mistral': 746, 'n_tokens_neox': 735, 'n_words': 222}