// Path: src/org/sagemath/droid/utils/UrlUtils.java
// public class UrlUtils {
// 
//     private static final String TAG = "SageDroid:UrlUtils";
// 
//     public static String getInitialKernelURL() {
//         Uri.Builder builder = new Uri.Builder();
//         builder
//                 .scheme(SCHEME_HTTP)
//                 .authority(BASE_SERVER_URL)
//                 .appendPath(PATH_KERNEL)
//                 .build();
// 
//         Log.i(TAG, "Initial Kernal URL: " + builder.toString());
// 
//         return builder.toString();
//     }
// 
//     public static String getPermalinkURL() {
//         Uri.Builder builder = new Uri.Builder();
//         builder
//                 .scheme(SCHEME_HTTPS)
//                 .authority(BASE_SERVER_URL)
//                 .appendPath(PATH_PERMALINK)
//                 .build();
// 
//         Log.i(TAG, "Permalink URL: " + builder.toString());
// 
//         return builder.toString();
//     }
// 
//     public static String getShellURL(String kernel_id, String webSocketUrl) {
//         Uri shellURL = Uri.parse(webSocketUrl).buildUpon()
//                 .appendPath(PATH_KERNEL)
//                 .appendPath(kernel_id)
//                 .appendPath(PATH_SHELL)
//                 .build();
// 
//         Log.i(TAG, "Shell URL: " + shellURL.toString());
// 
//         return shellURL.toString();
//     }
// 
//     public static String getIoPubURL(String kernel_id, String webSocketUrl) {
//         Uri ioPubURL = Uri.parse(webSocketUrl).buildUpon()
//                 .appendPath(PATH_KERNEL)
//                 .appendPath(kernel_id)
//                 .appendPath(PATH_IOPUB)
//                 .build();
// 
//         Log.i(TAG, "IOPub URL: " + ioPubURL.toString());
// 
//         return ioPubURL.toString();
//     }
// 
// }


import android.net.Uri;
import android.util.Log;
import com.google.gson.annotations.SerializedName;
import org.sagemath.droid.utils.UrlUtils;
package org.sagemath.droid.models.gson;


/**
 * Reply containing an Image URL.
 *
 * @author Nikhil Peter Raj
 */
public class ImageReply extends BaseReply {
    private static final String TAG = "SageDroid:ImageReply";

    private static final String PATH_FILE = "files";
    private static final String SUFFIX_PNG = ".png";
    private static final String SUFFIX_JPG = ".jpg";
    private static final String SUFFIX_JPEG = ".jpeg";
    private static final String SUFFIX_SVG = ".svg";

    public static final String MIME_IMAGE_PNG = "image/png";
    public static final String MIME_IMAGE_SVG = "image/svg";

    public ImageReply() {
        super();
    }

    public String toString() {
        return gson.toJson(this);
    }

    private ImageContent content;

    public ImageContent getContent() {
        return content;
    }

    private transient String kernelID;

    public String getKernelID() {
        return kernelID;
    }

    public void setKernelID(String kernelID) {
        this.kernelID = kernelID;
    }

    public String getImageURL() {
// Path: src/org/sagemath/droid/utils/UrlUtils.java
// public class UrlUtils {
// 
//     private static final String TAG = "SageDroid:UrlUtils";
// 
//     public static String getInitialKernelURL() {
//         Uri.Builder builder = new Uri.Builder();
//         builder
//                 .scheme(SCHEME_HTTP)
//                 .authority(BASE_SERVER_URL)
//                 .appendPath(PATH_KERNEL)
//                 .build();
// 
//         Log.i(TAG, "Initial Kernal URL: " + builder.toString());
// 
//         return builder.toString();
//     }
// 
//     public static String getPermalinkURL() {
//         Uri.Builder builder = new Uri.Builder();
//         builder
//                 .scheme(SCHEME_HTTPS)
//                 .authority(BASE_SERVER_URL)
//                 .appendPath(PATH_PERMALINK)
//                 .build();
// 
//         Log.i(TAG, "Permalink URL: " + builder.toString());
// 
//         return builder.toString();
//     }
// 
//     public static String getShellURL(String kernel_id, String webSocketUrl) {
//         Uri shellURL = Uri.parse(webSocketUrl).buildUpon()
//                 .appendPath(PATH_KERNEL)
//                 .appendPath(kernel_id)
//                 .appendPath(PATH_SHELL)
//                 .build();
// 
//         Log.i(TAG, "Shell URL: " + shellURL.toString());
// 
//         return shellURL.toString();
//     }
// 
//     public static String getIoPubURL(String kernel_id, String webSocketUrl) {
//         Uri ioPubURL = Uri.parse(webSocketUrl).buildUpon()
//                 .appendPath(PATH_KERNEL)
//                 .appendPath(kernel_id)
//                 .appendPath(PATH_IOPUB)
//                 .build();
// 
//         Log.i(TAG, "IOPub URL: " + ioPubURL.toString());
// 
//         return ioPubURL.toString();
//     }
// 
// }


// Path: src/org/sagemath/droid/models/gson/ImageReply.java
import android.net.Uri;
import android.util.Log;
import com.google.gson.annotations.SerializedName;
import org.sagemath.droid.utils.UrlUtils;

package org.sagemath.droid.models.gson;


/**
 * Reply containing an Image URL.
 *
 * @author Nikhil Peter Raj
 */
public class ImageReply extends BaseReply {
    private static final String TAG = "SageDroid:ImageReply";

    private static final String PATH_FILE = "files";
    private static final String SUFFIX_PNG = ".png";
    private static final String SUFFIX_JPG = ".jpg";
    private static final String SUFFIX_JPEG = ".jpeg";
    private static final String SUFFIX_SVG = ".svg";

    public static final String MIME_IMAGE_PNG = "image/png";
    public static final String MIME_IMAGE_SVG = "image/svg";

    public ImageReply() {
        super();
    }

    public String toString() {
        return gson.toJson(this);
    }

    private ImageContent content;

    public ImageContent getContent() {
        return content;
    }

    private transient String kernelID;

    public String getKernelID() {
        return kernelID;
    }

    public void setKernelID(String kernelID) {
        this.kernelID = kernelID;
    }

    public String getImageURL() {
        String kernelURL = UrlUtils.getInitialKernelURL();