<commit_before><commit_msg>Refactored Project metamodel to include a platform-internal class for storing scheduler information.<commit_after>package org.ossmeter.repository.model;

import com.mongodb.*;
import java.util.*;
import com.googlecode.pongo.runtime.*;
import com.googlecode.pongo.runtime.querying.*;


public class PlatformInternal extends Pongo {
	
	protected List<MetricProvider> metricProviderData = null;
	protected LocalStorage storage = null;
	
	
	public PlatformInternal() { 
		super();
		dbObject.put("metricProviderData", new BasicDBList());
		MONITOR.setOwningType("org.ossmeter.repository.model.PlatformInternal");
		INERRORSTATE.setOwningType("org.ossmeter.repository.model.PlatformInternal");
		LASTEXECUTED.setOwningType("org.ossmeter.repository.model.PlatformInternal");
	}
	
	public static StringQueryProducer MONITOR = new StringQueryProducer("monitor"); 
	public static StringQueryProducer INERRORSTATE = new StringQueryProducer("inErrorState"); 
	public static StringQueryProducer LASTEXECUTED = new StringQueryProducer("lastExecuted"); 
	
	
	public boolean getMonitor() {
		return parseBoolean(dbObject.get("monitor")+"", true);
	}
	
	public PlatformInternal setMonitor(boolean monitor) {
		dbObject.put("monitor", monitor);
		notifyChanged();
		return this;
	}
	public boolean getInErrorState() {
		return parseBoolean(dbObject.get("inErrorState")+"", false);
	}
	
	public PlatformInternal setInErrorState(boolean inErrorState) {
		dbObject.put("inErrorState", inErrorState);
		notifyChanged();
		return this;
	}
	public String getLastExecuted() {
		return parseString(dbObject.get("lastExecuted")+"", "");
	}
	
	public PlatformInternal setLastExecuted(String lastExecuted) {
		dbObject.put("lastExecuted", lastExecuted);
		notifyChanged();
		return this;
	}
	
	
	public List<MetricProvider> getMetricProviderData() {
		if (metricProviderData == null) {
			metricProviderData = new PongoList<MetricProvider>(this, "metricProviderData", true);
		}
		return metricProviderData;
	}
	
	
	public LocalStorage getStorage() {
		if (storage == null && dbObject.containsField("storage")) {
			storage = (LocalStorage) PongoFactory.getInstance().createPongo((DBObject) dbObject.get("storage"));
		}
		return storage;
	}
	
	public PlatformInternal setStorage(LocalStorage storage) {
		if (this.storage != storage) {
			if (storage == null) {
				dbObject.removeField("storage");
			}
			else {
				dbObject.put("storage", storage.getDbObject());
			}
			this.storage = storage;
			notifyChanged();
		}
		return this;
	}
}
{'fraction_non_alphanumeric': 0.1180637544273908, 'fraction_numerical': 0.0, 'mean_word_length': 5.5347043701799485, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '6445081', 'n_tokens_mistral': 807, 'n_tokens_neox': 722, 'n_words': 150}