<commit_before>package org.vitrivr.cineast.core.data.entities;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.vitrivr.cineast.core.data.ExistenceCheck;
import org.vitrivr.cineast.core.data.MediaType;
import org.vitrivr.cineast.core.idgenerator.ObjectIdGenerator;

import java.io.File;
import java.nio.file.Path;
import java.util.UUID;

/**
 * @author rgasser
 * @version 1.0
 * @created 10.01.17
 */

/*
 * TODO #1: Review with Luca.
 * TODO #2: Define whether assigning a UUID is a good approach. Alternative: Hash the path.
 */
public class MultimediaObjectDescriptor implements ExistenceCheck {


    /** Name of the entity in the persistence layer. */
    public static final String ENTITY = "cineast_multimediaobject";

    /** Field names in the persistence layer. */
    public static final String[] FIELDNAMES = {"id", "mediatype", "name", "path", "preview", "segments"};

    private final String objectId;
    private final String name, path;
    private final boolean exists;
    private final int mediatypeId;

    @Deprecated
    public static MultimediaObjectDescriptor makeVideoDescriptor(String objectId, String name, String path, int width, int height, int framecount, float duration) {
      return new MultimediaObjectDescriptor(objectId, name, path, MediaType.VIDEO, true);
    }

    @Deprecated
    public static MultimediaObjectDescriptor makeImageDescriptor(String objectId, String name, String path, int width, int height) {
      return new MultimediaObjectDescriptor(objectId, name, path, MediaType.IMAGE, true);
    }

    public static MultimediaObjectDescriptor makeMultimediaDescriptor(String objectId, String name, String path, MediaType type) {
        return new MultimediaObjectDescriptor(objectId, name, path, type, true);<commit_msg>Removed comment (TODO)<commit_after>package org.vitrivr.cineast.core.data.entities;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.vitrivr.cineast.core.data.ExistenceCheck;
import org.vitrivr.cineast.core.data.MediaType;
import org.vitrivr.cineast.core.idgenerator.ObjectIdGenerator;

import java.io.File;
import java.nio.file.Path;
import java.util.UUID;

/**
 * @author rgasser
 * @version 1.0
 * @created 10.01.17
 */
public class MultimediaObjectDescriptor implements ExistenceCheck {


    /** Name of the entity in the persistence layer. */
    public static final String ENTITY = "cineast_multimediaobject";

    /** Field names in the persistence layer. */
    public static final String[] FIELDNAMES = {"id", "mediatype", "name", "path", "preview", "segments"};

    private final String objectId;
    private final String name, path;
    private final boolean exists;
    private final int mediatypeId;

    @Deprecated
    public static MultimediaObjectDescriptor makeVideoDescriptor(String objectId, String name, String path, int width, int height, int framecount, float duration) {
      return new MultimediaObjectDescriptor(objectId, name, path, MediaType.VIDEO, true);
    }

    @Deprecated
    public static MultimediaObjectDescriptor makeImageDescriptor(String objectId, String name, String path, int width, int height) {
      return new MultimediaObjectDescriptor(objectId, name, path, MediaType.IMAGE, true);
    }

    public static MultimediaObjectDescriptor makeMultimediaDescriptor(String objectId, String name, String path, MediaType type) {
        return new MultimediaObjectDescriptor(objectId, name, path, type, true);
{'fraction_non_alphanumeric': 0.09154731816905363, 'fraction_numerical': 0.005054759898904802, 'mean_word_length': 4.618296529968454, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '4335113', 'n_tokens_mistral': 1024, 'n_tokens_neox': 962, 'n_words': 303}