<commit_before>package org.onesocialweb.model.vcard4;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.TimeZone;

import org.onesocialweb.model.acl.AclRule;

public class DefaultTimeZoneField extends TimeZoneField
{

	private TimeZone timezone;
	
	private TimeZoneField.Type type = TimeZoneField.Type.TEXT;
	
	private List<AclRule> rules = new ArrayList<AclRule>();
	
	@Override
	public String getTimeZone() {
		if (timezone != null) {
			return timezone.getID();
		} else {
			return null;
		}
	}
	
	@Override
	public TimeZone getJavaTimeZone() {
		return timezone;
	}
	
	@Override
	public Type getType() {
		return type;
	}
	
	@Override
	public void setTimeZone(String value, Type type) {
		TimeZone tz=TimeZone.getTimeZone(value);
		if (!tz.getID().equalsIgnoreCase(value))
			tz=TimeZone.getDefault();		
		setJavaTimeZone(tz);		
		this.type = type;
	}
	
	@Override
	public void setJavaTimeZone(TimeZone tz) {
		this.timezone = tz;		
	}
	
	@Override
	public void addAclRule(AclRule rule) {
		rules.add(rule);<commit_msg>Small change to DefaulTimeZoneField for ease of use with the Web client<commit_after>package org.onesocialweb.model.vcard4;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.TimeZone;

import org.onesocialweb.model.acl.AclRule;

public class DefaultTimeZoneField extends TimeZoneField
{

	private TimeZone timezone;
	
	private TimeZoneField.Type type = TimeZoneField.Type.TEXT;
	
	private List<AclRule> rules = new ArrayList<AclRule>();
	
	@Override
	public String getTimeZone() {
		if (timezone != null) {
			return timezone.getID();
		} else {
			return null;
		}
	}
	
	@Override
	public TimeZone getJavaTimeZone() {
		return timezone;
	}
	
	@Override
	public Type getType() {
		return type;
	}
	
	@Override
	public void setTimeZone(String value, Type type) {
		TimeZone tz=TimeZone.getTimeZone(value);	
		setJavaTimeZone(tz);		
		this.type = type;
	}
	
	@Override
	public void setJavaTimeZone(TimeZone tz) {
		this.timezone = tz;		
	}
	
	@Override
	public void addAclRule(AclRule rule) {
		rules.add(rule);
{'fraction_non_alphanumeric': 0.1022993899577663, 'fraction_numerical': 0.0009385265133740028, 'mean_word_length': 4.2254901960784315, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, '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': '6539054', 'n_tokens_mistral': 788, 'n_tokens_neox': 712, 'n_words': 169}