<commit_before>/* Copyright 2005 I Serv Consultoria Empresarial Ltda.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License 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 org.helianto.task.domain;

import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.DiscriminatorColumn;
import javax.persistence.DiscriminatorType;
import javax.persistence.DiscriminatorValue;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;
import javax.persistence.UniqueConstraint;

import org.helianto.core.Navigable;
import org.helianto.core.Programmable;
import org.helianto.core.def.HumanReadable;
import org.helianto.core.def.PrivacyLevel;
import org.helianto.core.domain.Category;
import org.helianto.core.domain.Entity;
import org.helianto.core.domain.Identity;
import org.helianto.core.utils.StringListUtils;
import org.helianto.document.internal.AbstractSerializer;
import org.helianto.partner.domain.Partner;
import org.helianto.task.def.ReportFolderContentType;
import org.helianto.task.def.Resolution2;
import org.helianto.user.domain.User;
import org.helianto.user.domain.UserGroup;

import com.fasterxml.jackson.annotation.JsonIgnore;

/**
 * Report folder, a.k.a. Project.
 * 
 * @author <NAME>
 */
@javax.persistence.Entity
@Table(name="task_serializer",
	    uniqueConstraints = {@UniqueConstraint(columnNames={"entityId", "builderCode"})}
	)
@Inheritance(strategy=InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(
    name="type",
    discriminatorType=DiscriminatorType.CHAR
)
@DiscriminatorValue("F")
public class ReportFolder 
	extends AbstractSerializer<Report> 
	implements HumanReadable
	, Programmable
	, Navigable
{

	private static final long serialVersionUID = 1L;
	
	@Lob
	private byte[] content ="".getBytes();
	
	@Column(length=32)
    private String encoding = "iso8859_1";
	
	@JsonIgnore
	@ManyToOne
	@JoinColumn(name="ownerId")
	private Identity owner;
	
	@Transient
	public Integer ownerId;
	
	@Column(length=20)
	private String reportNumberPattern = "";
	
	private String patternSuffix = "";
	
	@Column(length=1024)
	private String parsedContent = "";
	
	@JsonIgnore
	@ManyToOne
    @JoinColumn(name="categoryId", nullable=true)
	private Category category;
	
	@Transient
	public Integer categoryId;
	
	private Character privacyLevel = new Character(PrivacyLevel.PUBLIC.getValue());
	
	@Column(length=20)
	private String zIndex = "";
	
	@JsonIgnore
	@ManyToOne
	@JoinColumn(name="partnerId")
	private Partner partner;
	
	@Transient
	public Integer partnerId;
	
	@JsonIgnore
	@ManyToOne
    @JoinColumn(name="userGroupId", nullable=true)
    private UserGroup userGroup;
	
	@Transient
	public Integer userGroupId;
	
	@Column(length=32)
	private String folderCaption = "";
	
	@Column(length=64)
	private String parentPath = "";
	
	@Column(length=12)
    private String nature = "";
	
	@Column(length=6)
	@Enumerated(EnumType.STRING)
	private Resolution2 resolution;
	
	@Column(length=255)
    private String traceabilityItems = "";
	
    @Temporal(TemporalType.TIMESTAMP)
	private Date startDate;
	
	@Temporal(TemporalType.TIMESTAMP)
	private Date endDate;
	<commit_msg>Changed field size.<commit_after>/* Copyright 2005 I Serv Consultoria Empresarial Ltda.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License 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 org.helianto.task.domain;

import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.DiscriminatorColumn;
import javax.persistence.DiscriminatorType;
import javax.persistence.DiscriminatorValue;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;
import javax.persistence.UniqueConstraint;

import org.helianto.core.Navigable;
import org.helianto.core.Programmable;
import org.helianto.core.def.HumanReadable;
import org.helianto.core.def.PrivacyLevel;
import org.helianto.core.domain.Category;
import org.helianto.core.domain.Entity;
import org.helianto.core.domain.Identity;
import org.helianto.core.utils.StringListUtils;
import org.helianto.document.internal.AbstractSerializer;
import org.helianto.partner.domain.Partner;
import org.helianto.task.def.ReportFolderContentType;
import org.helianto.task.def.Resolution2;
import org.helianto.user.domain.User;
import org.helianto.user.domain.UserGroup;

import com.fasterxml.jackson.annotation.JsonIgnore;

/**
 * Report folder, a.k.a. Project.
 * 
 * @author <NAME>
 */
@javax.persistence.Entity
@Table(name="task_serializer",
	    uniqueConstraints = {@UniqueConstraint(columnNames={"entityId", "builderCode"})}
	)
@Inheritance(strategy=InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(
    name="type",
    discriminatorType=DiscriminatorType.CHAR
)
@DiscriminatorValue("F")
public class ReportFolder 
	extends AbstractSerializer<Report> 
	implements HumanReadable
	, Programmable
	, Navigable
{

	private static final long serialVersionUID = 1L;
	
	@Lob
	private byte[] content ="".getBytes();
	
	@Column(length=32)
    private String encoding = "iso8859_1";
	
	@JsonIgnore
	@ManyToOne
	@JoinColumn(name="ownerId")
	private Identity owner;
	
	@Transient
	public Integer ownerId;
	
	@Column(length=20)
	private String reportNumberPattern = "";
	
	private String patternSuffix = "";
	
	@Column(length=1024)
	private String parsedContent = "";
	
	@JsonIgnore
	@ManyToOne
    @JoinColumn(name="categoryId", nullable=true)
	private Category category;
	
	@Transient
	public Integer categoryId;
	
	private Character privacyLevel = new Character(PrivacyLevel.PUBLIC.getValue());
	
	@Column(length=20)
	private String zIndex = "";
	
	@JsonIgnore
	@ManyToOne
	@JoinColumn(name="partnerId")
	private Partner partner;
	
	@Transient
	public Integer partnerId;
	
	@JsonIgnore
	@ManyToOne
    @JoinColumn(name="userGroupId", nullable=true)
    private UserGroup userGroup;
	
	@Transient
	public Integer userGroupId;
	
	@Column(length=32)
	private String folderCaption = "";
	
	@Column(length=64)
	private String parentPath = "";
	
	@Column(length=12)
    private String nature = "";
	
	@Column(length=12)
	@Enumerated(EnumType.STRING)
	private Resolution2 resolution;
	
	@Column(length=255)
    private String traceabilityItems = "";
	
    @Temporal(TemporalType.TIMESTAMP)
	private Date startDate;
	
	@Temporal(TemporalType.TIMESTAMP)
	private Date endDate;
	
{'fraction_non_alphanumeric': 0.10027554810111418, 'fraction_numerical': 0.008745657122319396, 'mean_word_length': 5.343465045592705, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, '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': '1084116', 'n_tokens_mistral': 2652, 'n_tokens_neox': 2521, 'n_words': 606}