<commit_before>/**
 *  This file is part of MythTV for Android
 * 
 *  MythTV for Android is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  MythTV for Android is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with MythTV for Android.  If not, see <http://www.gnu.org/licenses/>.
 *   
 * This software can be found at <https://github.com/MythTV-Android/MythTV-Service-API/>
 *
 */
package org.mythtv.services.api.v027;

import java.util.logging.Level;

import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.joda.JodaModule;

import org.joda.time.DateTime;
import org.mythtv.services.api.BaseMythServicesTemplate;
import org.mythtv.services.api.MythServicesErrorHandler;
import org.mythtv.services.api.converters.JodaDateTimeTransform;
import org.mythtv.services.api.v027.impl.CaptureTemplate;
import org.mythtv.services.api.v027.impl.ChannelTemplate;
import org.mythtv.services.api.v027.impl.ContentTemplate;
import org.mythtv.services.api.v027.impl.DvrTemplate;
import org.mythtv.services.api.v027.impl.GuideTemplate;
import org.mythtv.services.api.v027.impl.MythTemplate;
import org.mythtv.services.api.v027.impl.VideoTemplate;
import org.mythtv.services.api.v027.impl.FrontendTemplate;
import org.mythtv.services.api.v027.impl.StatusTemplate;
import org.mythtv.services.api.v027.status.beans.Job.Command;
import org.mythtv.services.api.v027.status.beans.Job.Flag;
import org.mythtv.services.api.v027.status.beans.Job.Status;
import org.mythtv.services.api.v027.status.beans.Job.Type;
import org.mythtv.services.api.v027.status.converters.JobCommandTransform;
import org.mythtv.services.api.v027.status.converters.JobFlagTransform;
import org.mythtv.services.api.v027.status.converters.JobStatusTransform;
import org.mythtv.services.api.v027.status.converters.JobTypeTransform;
import org.simpleframework.xml.Serializer;
import org.simpleframework.xml.convert.AnnotationStrategy;
import org.simpleframework.xml.core.Persister;
import org.simpleframework.xml.strategy.Strategy;
import org.simpleframework.xml.transform.RegistryMatcher;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.http.converter.xml.SimpleXmlHttpMessageConverter;
import org.springframework.web.client.RestOperations;
import org.springframework.web.client.RestTemplate;

/**
 * <b>Auto-generated file, do not modify manually !!!!</b>
 *
 * @author <NAME>
 */
public class MythServicesTemplate extends BaseMythServicesTemplate implements MythServices {

	private CaptureOperations captureOperations;
	private ChannelOperations channelOperations;
	private ContentOperations contentOperations;
	private DvrOperations dvrOperations;
	private GuideOperations guideOperations;
	private MythOperations mythOperations;
	private VideoOperations videoOperations;
	private FrontendOperations frontendOperations;
	private StatusOperations statusOperations;
	protected final RestOperations restOperations;
	
	public MythServicesTemplate( String apiUrlBase ) {
		this(apiUrlBase, Level.INFO);
	}
	
	public MythServicesTemplate( String apiUrlBase, Level logLevel) {
		super(apiUrlBase, logLevel);
		this.restOperations = createRestOperations();
		initSubApis();

	}
	
	protected RestOperations createRestOperations() {
		RestTemplate rest = new RestTemplate( true );
		
		for( HttpMessageConverter<?> messageConverter : rest.getMessageConverters() ) {

			if( messageConverter instanceof MappingJackson2HttpMessageConverter ) {
				
				ObjectMapper objectMapper = new ObjectMapper();
				objectMapper.registerModule( new JodaModule() );
				objectMapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true);
				
				MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter = (MappingJackson2HttpMessageConverter) messageConverter;
				mappingJackson2HttpMessageConverter.setObjectMapper( objectMapper );
			}
		
			if( messageConverter instanceof SimpleXmlHttpMessageConverter ) {

				RegistryMatcher matchers = new RegistryMatcher();<commit_msg>regenerated classes : converted xs:time to localTime and xs:date to LocalDate<commit_after>/**
 *  This file is part of MythTV for Android
 * 
 *  MythTV for Android is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  MythTV for Android is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with MythTV for Android.  If not, see <http://www.gnu.org/licenses/>.
 *   
 * This software can be found at <https://github.com/MythTV-Android/MythTV-Service-API/>
 *
 */
package org.mythtv.services.api.v027;

import java.util.logging.Level;

import com.fasterxml.jackson.core.Version;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.deser.std.StdDelegatingDeserializer;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.datatype.joda.JodaModule;


import org.joda.time.DateTime;
import org.mythtv.services.api.ArrayOfString;
import org.mythtv.services.api.BaseMythServicesTemplate;
import org.mythtv.services.api.MythServicesErrorHandler;
import org.mythtv.services.api.converters.ArrayOfStringConverter;
import org.mythtv.services.api.converters.JodaDateTimeTransform;
import org.mythtv.services.api.v027.impl.CaptureTemplate;
import org.mythtv.services.api.v027.impl.ChannelTemplate;
import org.mythtv.services.api.v027.impl.ContentTemplate;
import org.mythtv.services.api.v027.impl.DvrTemplate;
import org.mythtv.services.api.v027.impl.GuideTemplate;
import org.mythtv.services.api.v027.impl.MythTemplate;
import org.mythtv.services.api.v027.impl.VideoTemplate;
import org.mythtv.services.api.v027.impl.FrontendTemplate;
import org.mythtv.services.api.v027.impl.StatusTemplate;
import org.mythtv.services.api.v027.status.beans.Job.Command;
import org.mythtv.services.api.v027.status.beans.Job.Flag;
import org.mythtv.services.api.v027.status.beans.Job.Status;
import org.mythtv.services.api.v027.status.beans.Job.Type;
import org.mythtv.services.api.v027.status.converters.JobCommandTransform;
import org.mythtv.services.api.v027.status.converters.JobFlagTransform;
import org.mythtv.services.api.v027.status.converters.JobStatusTransform;
import org.mythtv.services.api.v027.status.converters.JobTypeTransform;
import org.simpleframework.xml.Serializer;
import org.simpleframework.xml.convert.AnnotationStrategy;
import org.simpleframework.xml.core.Persister;
import org.simpleframework.xml.strategy.Strategy;
import org.simpleframework.xml.transform.RegistryMatcher;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.http.converter.xml.SimpleXmlHttpMessageConverter;
import org.springframework.web.client.RestOperations;
import org.springframework.web.client.RestTemplate;

/**
 * <b>Auto-generated file, do not modify manually !!!!</b>
 *
 * @author <NAME>
 */
public class MythServicesTemplate extends BaseMythServicesTemplate implements MythServices {

	private CaptureOperations captureOperations;
	private ChannelOperations channelOperations;
	private ContentOperations contentOperations;
	private DvrOperations dvrOperations;
	private GuideOperations guideOperations;
	private MythOperations mythOperations;
	private VideoOperations videoOperations;
	private FrontendOperations frontendOperations;
	private StatusOperations statusOperations;
	protected final RestOperations restOperations;
	
	public MythServicesTemplate( String apiUrlBase ) {
		this(apiUrlBase, Level.INFO);
	}
	
	public MythServicesTemplate( String apiUrlBase, Level logLevel) {
		super(apiUrlBase, logLevel);
		this.restOperations = createRestOperations();
		initSubApis();

	}
	
	protected RestOperations createRestOperations() {
		RestTemplate rest = new RestTemplate( true );
		
		for( HttpMessageConverter<?> messageConverter : rest.getMessageConverters() ) {

			if( messageConverter instanceof MappingJackson2HttpMessageConverter ) {
                StdDelegatingDeserializer<ArrayOfString> delegatingDeserializer = new StdDelegatingDeserializer<ArrayOfString>(new ArrayOfStringConverter());
                SimpleModule customModule = new SimpleModule("org.mythtv.service.api.module", new Version(1, 0, 0, null, null, null)).addDeserializer(ArrayOfString.class, delegatingDeserializer);

				ObjectMapper objectMapper = new ObjectMapper();
				objectMapper.registerModule( new JodaModule() );
				objectMapper.registerModule(customModule);
				objectMapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true);
				
				MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter = (MappingJackson2HttpMessageConverter) messageConverter;
				mappingJackson2HttpMessageConverter.setObjectMapper( objectMapper );
			}
		
			if( messageConverter instanceof SimpleXmlHttpMessageConverter ) {

				RegistryMatcher matchers = new RegistryMatcher();
{'fraction_non_alphanumeric': 0.08671679197994987, 'fraction_numerical': 0.012531328320802004, 'mean_word_length': 5.699798522498321, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 21}, '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': '1219597', 'n_tokens_mistral': 3032, 'n_tokens_neox': 2870, 'n_words': 622}