text:
package org.enterprisedomain.classmaker.impl;

import java.io.File;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.Callable;
import java.util.concurrent.Executor;
import java.util.concurrent.Future;
import java.util.concurrent.FutureTask;
import java.util.concurrent.Semaphore;

import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.emf.codegen.util.CodeGenUtil;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.BasicDiagnostic;
import org.eclipse.emf.common.util.Diagnostic;
import org.eclipse.emf.common.util.ECollections;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EOperation;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.util.EContentAdapter;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.xmi.XMLResource;
import org.eclipse.m2m.qvt.oml.BasicModelExtent;
import org.eclipse.m2m.qvt.oml.ExecutionContextImpl;
import org.eclipse.m2m.qvt.oml.ExecutionDiagnostic;
import org.eclipse.m2m.qvt.oml.ModelExtent;
import org.eclipse.m2m.qvt.oml.TransformationExecutor;
import org.enterprisedomain.classmaker.Blueprint;
import org.enterprisedomain.classmaker.ClassMakerFactory;
import org.enterprisedomain.classmaker.ClassMakerPackage;
import org.enterprisedomain.classmaker.ClassMakerService;
import org.enterprisedomain.classmaker.CompletionListener;
import org.enterprisedomain.classmaker.Contribution;
import org.enterprisedomain.classmaker.Project;
import org.enterprisedomain.classmaker.Revision;
import org.enterprisedomain.classmaker.State;
import org.enterprisedomain.classmaker.Workspace;
import org.enterprisedomain.classmaker.core.ClassMakerPlugin;
import org.enterprisedomain.classmaker.util.ModelUtil;
import org.enterprisedomain.classmaker.util.ResourceUtils;
import org.osgi.framework.Version;

/**
 *  An implementation of the model object
 * 'Service'.
 *

 * The following features are implemented:
 *

 *

 *
{@link org.enterprisedomain.classmaker.impl.ClassMakerServiceImpl#getWorkspace
 * Workspace}

 *

 *
 * @generated
 */
public class ClassMakerServiceImpl extends EObjectImpl implements ClassMakerService {
	/**
	 * The cached value of the '{@link #getWorkspace() Workspace}'
	 * containment reference.
	 *
	 * @see #getWorkspace()
	 * @generated
	 * @ordered
	 */
	protected Workspace workspace;

	/**
	 * The cached value of the '{@link #isInitializing() Initializing}'
	 * attribute.
	 *
	 * @see #isInitializing()
	 * @generated NOT
	 * @ordered
	 */
	public static boolean initializing = INITIALIZING_EDEFAULT;

	private WorkspaceResourceAdapter workspaceResourceAdapter = new WorkspaceResourceAdapter();

	private class WorkspaceResourceAdapter extends EContentAdapter {

		@Override
		public void notifyChanged(Notification msg) {
			super.notifyChanged(msg);
			if (msg.getFeatureID(State.class) == ClassMakerPackage.STATE__PHASE
					&& msg.getEventType() == Notification.SET) {
				final URI uri = URI.createFileURI(ResourceUtils.WORKSPACE_RESOURCE_PATH.toString());
				Resource workspaceResource = WorkspaceImpl.RESOURCE_SET_EDEFAULT.getResource(uri, false);
				Map<String, String> options = new HashMap<String, String>();
				options.put(XMLResource.OPTION_PROCESS_DANGLING_HREF, XMLResource.OPTION_PROCESS_DANGLING_HREF_RECORD);
				options.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);
				if (workspaceResource != null) {
					if (getWorkspace().eIsSet(ClassMakerPackage.Literals.WORKSPACE__PROJECTS)) {
						try {
							workspaceResource.getContents().set(0, EcoreUtil.copy(getWorkspace()));
							try {
								workspaceResource.save(options);
							} catch (IOException e) {
								e.printStackTrace();
							}
						} catch (ClassCastException e) {
							try {
								workspaceResource.save(options);
							} catch (IOException e1) {
								e1.printStackTrace();
							}
						}
					}
				} else {
					workspaceResource = WorkspaceImpl.RESOURCE_SET_EDEFAULT.createResource(uri);
					try {
						workspaceResource.getContents().add(EcoreUtil.copy(getWorkspace()));
						try {
							workspaceResource.save(options);
						} catch (IOException e) {
							e.printStackTrace();
						}
					} catch (ClassCastException e) {
						try {
							workspaceResource.save(options);
						} catch (IOException e1) {
							e1.printStackTrace();
						}
					}
				}
			}
		}
	}

	/**
	 *
	 *
	 * @generated NOT
	 */
	public ClassMakerServiceImpl() {
		super();
		workspace = ClassMakerFactory.eINSTANCE.createWorkspace();
		workspace.getResourceSet().eAdapters().add(workspaceResourceAdapter);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return ClassMakerPackage.Literals.CLASS_MAKER_SERVICE;
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public Workspace getWorkspace() {
		return workspace;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public NotificationChain basicSetWorkspace(Workspace newWorkspace, NotificationChain msgs) {
		Workspace oldWorkspace = workspace;
		workspace = newWorkspace;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
					ClassMakerPackage.CLASS_MAKER_SERVICE__WORKSPACE, oldWorkspace, newWorkspace);
			if (msgs == null)
				msgs = notification;
			else
				msgs.add(notification);
		}
		return msgs;
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public void setWorkspace(Workspace newWorkspace) {
		if (newWorkspace != workspace) {
			NotificationChain msgs = null;
			if (workspace != null)
				msgs = ((InternalEObject) workspace).eInverseRemove(this, ClassMakerPackage.WORKSPACE__SERVICE,
						Workspace.class, msgs);
			if (newWorkspace != null)
				msgs = ((InternalEObject) newWorkspace).eInverseAdd(this, ClassMakerPackage.WORKSPACE__SERVICE,
						Workspace.class, msgs);
			msgs = basicSetWorkspace(newWorkspace, msgs);
			if (msgs != null)
				msgs.dispatch();
		} else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, ClassMakerPackage.CLASS_MAKER_SERVICE__WORKSPACE,
					newWorkspace, newWorkspace));
	}

	/**
	 *
	 *
	 * @generated NOT
	 */
	public EObject make(EObject input, IProgressMonitor monitor) throws CoreException {
		Blueprint blueprint = createBlueprint();
		blueprint.setDynamicModel(input);
		return make(blueprint, monitor);
	}

	/**
	 *
	 *
	 * @generated NOT
	 */
	public EObject make(Blueprint input, IProgressMonitor monitor) throws CoreException {
		try {
			Contribution contrib = getWorkspace().createContribution(input.getDynamicModel(), monitor);
			contrib.getDependencies().addAll(input.getDependencies());
			contrib.getState().setEdit(input.isEdit());
			contrib.getState().setEditor(input.isEditor());
			final Semaphore wait = new Semaphore(0);
			input.getCompletionListeners().add(new CompletionListenerImpl() {

				@Override
				public void completed(Project result) throws Exception {
					wait.release();
				}

			});
			for (CompletionListener listener : input.getCompletionListeners())
				contrib.addCompletionListener(listener);
			contrib.make(monitor);
			try {
				wait.acquire();
			} catch (InterruptedException e) {
			}
			return contrib.getDomainModel().getGenerated();
		} catch (CoreException e) {
			ClassMakerPlugin.getInstance().getLog().log(e.getStatus());
			throw e;
		}
	}

	/**
	 *
	 *
	 * @generated NOT
	 */
	public EObject replace(EObject source, EObject target, IProgressMonitor monitor) throws CoreException {
		return replace(source, target, true, monitor);
	}

	/**
	 *
	 *
	 * @generated NOT
	 */
	public EObject replace(Blueprint source, Blueprint target, IProgressMonitor monitor) throws CoreException {
		return replace(source, target, true, monitor);
	}

	/**
	 *
	 *
	 * @generated NOT
	 */
	public EObject replace(EObject source, EObject target, boolean changeVersion, IProgressMonitor monitor)
			throws CoreException {
		Blueprint sourceBlueprint = createBlueprint();
		sourceBlueprint.setDynamicModel(source);
		Blueprint targetBlueprint = createBlueprint();
		targetBlueprint.setDynamicModel(target);
		return replace(sourceBlueprint, targetBlueprint, changeVersion, monitor);
	}

	/**
	 *
	 *
	 * @generated NOT
	 */
	public EObject replace(Blueprint source, Blueprint target, boolean changeVersion, IProgressMonitor monitor)
			throws CoreException {
		try {
			Version version = null;
			Contribution contribution = getWorkspace().getContribution(source.getDynamicModel(), false);
			if (contribution == null) {
				contribution = getWorkspace().getContribution(source.getDynamicModel(), true);
				if (contribution != null) {
					version = contribution.getVersion();
					if (changeVersion)
						version = contribution.newVersion(version, false, false, true);
				} else
					return null;
			} else if (changeVersion)
				version = contribution.nextVersion();
			else
				version = contribution.getVersion();
			return replace(source, target, version, monitor);
		} catch (CoreException e) {
			ClassMakerPlugin.getInstance().getLog().log(e.getStatus());
			throw e;
		}
	}

	/**
	 *
	 *
	 * @generated NOT
	 */
	public EObject replace(EObject source, EObject target, Version version, IProgressMonitor monitor)
			throws CoreException {
		Blueprint sourceBlueprint = createBlueprint();
		sourceBlueprint.setDynamicModel(source);
		Blueprint targetBlueprint = createBlueprint();
		targetBlueprint.setDynamicModel(target);
		if (getWorkspace().getContribution(source, true) != null)
			targetBlueprint.getDependencies().addAll(getWorkspace().getContribution(source, true).getDependencies());
		return replace(sourceBlueprint, targetBlueprint, version, monitor);
	}

	/**
	 *
	 *
	 * @generated NOT
	 */
	public EObject replace(Blueprint source, Blueprint target, Version version, IProgressMonitor monitor)
			throws CoreException {
		Contribution contribution = getWorkspace().getContribution(source.getDynamicModel(), false);
		if (contribution == null) {
			contribution = getWorkspace().getContribution(source.getDynamicModel(), true);
			if (contribution != null) {
				EObject existingModel = contribution.getDomainModel().getDynamic();
				if (ModelUtil.eObjectsAreEqual(existingModel, source.getDynamicModel(), false)) {
					Revision revision = null;
					if (version.compareTo(contribution.getVersion()) < 0) {
						if (!contribution.getRevisions().containsKey(version))
							return null;
						revision = contribution.getRevisions().get(version);
						contribution.checkout(revision.getVersion());
					} else
						revision = contribution.createRevision(monitor);
					revision.getDomainModel().setDynamic(EcoreUtil.copy(target.getDynamicModel()));
				}
			} else {
				return null;
			}
		} else {
			EObject existingModel = contribution.getDomainModel().getDynamic();
			if (ModelUtil.eObjectsAreEqual(existingModel, source.getDynamicModel(), true)) {
				Revision revision = contribution.getRevision();
				if (version.compareTo(contribution.getVersion()) > 0) {
					revision = contribution.newRevision(version);
					State state = revision.getState();
					state.copyModel(contribution.getState());
					revision.create(monitor);
					String commitId = state.initialize(true);
					contribution.checkout(revision.getVersion(), state.getTimestamp(), commitId);
				} else if (version.compareTo(contribution.getVersion()) < 0) {
					if (!contribution.getRevisions().containsKey(version))
						return null;
					revision = contribution.getRevisions().get(version);
					contribution.checkout(revision.getVersion());
				}
				revision.getDomainModel().setDynamic(EcoreUtil.copy(target.getDynamicModel()));
			} else {
				return null;
			}
		}
		contribution.getDependencies().addAll(target.getDependencies());
		final Semaphore wait = new Semaphore(0);
		CompletionListener waitListener = new CompletionListenerImpl() {

			@Override
			public void completed(Project result) throws Exception {
				wait.release();
			}

		};
		target.getCompletionListeners().add(waitListener);
		for (CompletionListener listener : target.getCompletionListeners())
			contribution.addCompletionListener(listener);
		contribution.make(monitor);
		try {
			wait.acquire();
		} catch (InterruptedException e) {
		}
		return contribution.getDomainModel().getGenerated();
	}

	/**
	 *
	 *
	 * @generated NOT
	 */
	public Future<? extends EObject> make(final Blueprint input, Executor executor, final IProgressMonitor monitor)
			throws CoreException {
		return asyncExecute(new Callable<EObject>() {

			@Override
			public EObject call() throws Exception {
				return make(input, monitor);
			}
		}, executor);
	}

	/**
	 *
	 *
	 * @generated NOT
	 */
	public Future<? extends EObject> replace(EObject source, EObject target, Executor executor,
			final IProgressMonitor monitor) throws CoreException {
		final Blueprint sourceBlueprint = createBlueprint();
		sourceBlueprint.setDynamicModel(source);
		final Blueprint targetBlueprint = createBlueprint();
		targetBlueprint.setDynamicModel(target);
		return asyncExecute(new Callable<EObject>() {

			@Override
			public EObject call() throws Exception {
				return replace(sourceBlueprint, targetBlueprint, monitor);
			}
		}, executor);
	}

	/**
	 *
	 *
	 * @generated NOT
	 */
	public Future<? extends EObject> make(EObject input, Executor executor, IProgressMonitor monitor)
			throws CoreException {
		Blueprint blueprint = createBlueprint();
		blueprint.setDynamicModel(input);
		return make(blueprint, executor, monitor);
	}

	/**
	 *
	 *
	 * @generated NOT
	 */
	public Future<? extends EObject> replace(final Blueprint source, final Blueprint target, Executor executor,
			final IProgressMonitor monitor) throws CoreException {
		return asyncExecute(new Callable<EObject>() {

			@Override
			public EObject call() throws Exception {
				return replace(source, target, monitor);
			}
		}, executor);
	}

	/**
	 *
	 *
	 * @generated NOT
	 */
	public Future<? extends EObject> replace(EObject source, EObject target, final boolean changeVersion,
			Executor executor, final IProgressMonitor monitor) throws CoreException {
		final Blueprint sourceBlueprint = createBlueprint();
		sourceBlueprint.setDynamicModel(source);
		final Blueprint targetBlueprint = createBlueprint();
		targetBlueprint.setDynamicModel(target);
		return asyncExecute(new Callable<EObject>() {

			@Override
			public EObject call() throws Exception {
				return replace(sourceBlueprint, targetBlueprint, changeVersion, monitor);
			}
		}, executor);
	}

	/**
	 *
	 *
	 * @generated NOT
	 */
	public Future<? extends EObject> replace(final Blueprint source, final Blueprint target,
			final boolean changeVersion, Executor executor, final IProgressMonitor monitor) throws CoreException {
		return asyncExecute(new Callable<EObject>() {

			@Override
			public EObject call() throws Exception {
				return replace(source, target, changeVersion, monitor);
			}
		}, executor);
	}

	/**
	 *
	 *
	 * @generated NOT
	 */
	public Future<? extends EObject> replace(EObject source, EObject target, final Version version, Executor executor,
			final IProgressMonitor monitor) throws CoreException {
		final Blueprint sourceBlueprint = createBlueprint();
		sourceBlueprint.setDynamicModel(source);
		final Blueprint targetBlueprint = createBlueprint();
		targetBlueprint.setDynamicModel(target);
		return asyncExecute(new Callable<EObject>() {

			@Override
			public EObject call() throws Exception {
				return replace(sourceBlueprint, targetBlueprint, version, monitor);
			}
		}, executor);
	}

	/**
	 *
	 *
	 * @generated NOT
	 */
	public Future<? extends EObject> replace(final Blueprint source, final Blueprint target, final Version version,
			Executor executor, final IProgressMonitor monitor) throws CoreException {
		return asyncExecute(new Callable<EObject>() {

			@Override
			public EObject call() throws Exception {
				return replace(source, target, version, monitor);
			}
		}, executor);
	}

	/**
	 *
	 *
	 * @generated NOT
	 */
	public EObject transform(EObject source, URI transformationURI) throws CoreException {
		IProgressMonitor monitor = ClassMakerPlugin.getProgressMonitor();
		return transform(source, transformationURI, monitor);
	}

	private Future<? extends EObject> asyncExecute(Callable<EObject> callable, Executor executor) throws CoreException {
		FutureTask<? extends EObject> future = new FutureTask<EObject>(callable);
		try {
			executor.execute(future);
		} catch (Exception e) {
			throw new CoreException(new Status(IStatus.ERROR, ClassMakerPlugin.PLUGIN_ID, e.getLocalizedMessage(), e));
		}
		return future;
	}

	/**
	 *
	 *
	 * @generated NOT
	 */
	public EObject transform(EObject source, URI transformationURI, IProgressMonitor monitor) throws CoreException {
		IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
		IPath transformationPath = ResourceUtils.getModelTransformationPath(
				root.getProject(getWorkspace().getContribution(source).getProjectName()), transformationURI);
		ResourceUtils.copyFile(transformationURI, transformationPath);
		URI localTransformationURI = URI.createFileURI(
				ResourcesPlugin.getWorkspace().getRoot().getRawLocation().append(transformationPath).toOSString());
		TransformationExecutor executor = new TransformationExecutor(localTransformationURI);

		EList<EObject> inObjects = ECollections.asEList(source);

		ModelExtent input = new BasicModelExtent(inObjects);
		ModelExtent output = new BasicModelExtent();

		// setup the execution environment details ->
		// configuration properties, logger, monitor object etc.
		ExecutionContextImpl context = new ExecutionContextImpl();
		context.setConfigProperty("keepModeling", true);

		// run the transformation assigned to the executor with the given
		// input and output and execution context
		// Remark: variable arguments count is supported
		ExecutionDiagnostic result = executor.execute(context, input, output);

		// check the result for success
		if (result.getSeverity() == Diagnostic.OK && !output.getContents().isEmpty()) {
			return output.getContents().get(0);
		} else {
			// turn the result diagnostic into status and send it to error log
			IStatus status = BasicDiagnostic.toIStatus(result);
			ClassMakerPlugin.getInstance().getLog().log(status);
			return null;
		}
	}

	/**
	 *
	 *
	 * @generated NOT
	 */
	public Object invoke(EOperation operation, EObject object, EList<Object> arguments)
			throws InvocationTargetException {
		for (EOperation o : object.eClass().getEAllOperations())
			if (o.getName().equals(operation.getName())) {
				return EcoreUtil.getInvocationDelegateFactory(o).createInvocationDelegate(o)
						.dynamicInvoke((InternalEObject) object, arguments);
			}
		return null;
	}

	/**
	 *
	 *
	 * @generated NOT
	 */
	public void delete(String packageName, IProgressMonitor monitor) throws CoreException {
		Contribution contribution = getWorkspace().getContribution(computeProjectName(packageName));
		if (contribution != null && !contribution.getState().isMaking())
			contribution.delete(monitor);
	}

	/**
	 *
	 *
	 * @generated NOT
	 */
	public boolean checkEquals(EObject model1, EObject model2) {
		return EcoreUtil.equals(model1, model2);
	}

	/**
	 *
	 *
	 * @generated NOT
	 */
	public Blueprint createBlueprint() {
		return ClassMakerFactory.eINSTANCE.createBlueprint();
	}

	/**
	 *
	 *
	 * @generated NOT
	 */
	public String computeProjectName(String packageName) {
		return CodeGenUtil.safeName(packageName.toLowerCase());
	}

	/**
	 *
	 *
	 * @generated NOT
	 */
	public <T extends EObject> T copy(T original) {
		return EcoreUtil.copy(original);
	}

	/**
	 *
	 *
	 * @generated NOT
	 */
	public void initialize() {
		initializing = true;
		getWorkspace().setService(this);
		ClassMakerService.Stages.contributeStages();
		final URI uri = URI.createFileURI(ResourceUtils.WORKSPACE_RESOURCE_PATH.toString());
		if (uri.isFile() && new File(uri.toFileString()).exists()) {
			try {
				Resource workspaceResource = WorkspaceImpl.RESOURCE_SET_EDEFAULT.getResource(uri, true);
				try {
					workspaceResource.load(Collections.emptyMap());
					if (!workspaceResource.getContents().isEmpty()) {
						setWorkspace(EcoreUtil.copy((Workspace) workspaceResource.getContents().get(0)));
						for (Project project : getWorkspace().getProjects()) {
							if (project.eIsSet(ClassMakerPackage.Literals.PROJECT__STATE))
								project.getState().load(false, true);
						}
					} else
						getWorkspace().initialize();
				} catch (IOException e) {
					e.printStackTrace();
				}
			} catch (Exception e) {
				e.printStackTrace();
			}
		} else
			getWorkspace().initialize();
		initializing = INITIALIZING_EDEFAULT;
	}

	/**
	 *
	 *
	 * @generated NOT
	 */
	public void dispose() {
		eUnset(ClassMakerPackage.CLASS_MAKER_SERVICE__WORKSPACE);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
		switch (featureID) {
		case ClassMakerPackage.CLASS_MAKER_SERVICE__WORKSPACE:
			if (workspace != null)
				msgs = ((InternalEObject) workspace).eInverseRemove(this,
						EOPPOSITE_FEATURE_BASE - ClassMakerPackage.CLASS_MAKER_SERVICE__WORKSPACE, null, msgs);
			return basicSetWorkspace((Workspace) otherEnd, msgs);
		}
		return super.eInverseAdd(otherEnd, featureID, msgs);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
		switch (featureID) {
		case ClassMakerPackage.CLASS_MAKER_SERVICE__WORKSPACE:
			return basicSetWorkspace(null, msgs);
		}
		return super.eInverseRemove(otherEnd, featureID, msgs);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
		case ClassMakerPackage.CLASS_MAKER_SERVICE__WORKSPACE:
			return getWorkspace();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
		case ClassMakerPackage.CLASS_MAKER_SERVICE__WORKSPACE:
			setWorkspace((Workspace) newValue);
			return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
		case ClassMakerPackage.CLASS_MAKER_SERVICE__WORKSPACE:
			setWorkspace((Workspace) null);
			return;
		}
		super.eUnset(featureID);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
		case ClassMakerPackage.CLASS_MAKER_SERVICE__WORKSPACE:
			return workspace != null;
		}
		return super.eIsSet(featureID);
	}

} // ClassMakerServiceImpl


text:
__author__ = 'j.s@google.com (Jeff Scudder)'

import unittest
import gdata.spreadsheets.data
import gdata.test_config as conf
import atom.core

SPREADSHEET = """<entry xmlns="http://www.w3.org/2005/Atom"
      xmlns:gd="http://schemas.google.com/g/2005"
      gd:etag='"BxAUSQUJRCp7ImBq"'>
  <id>http://spreadsheets.google.com/feeds/spreadsheets/private/full/key</id>
  <updated>2006-11-17T18:24:18.231Z</updated>
  <title type="text">Groceries R Us</title>
  <content type="text">Groceries R Us</content>
  <link rel="http://schemas.google.com/spreadsheets/2006#worksheetsfeed"
   type="application/atom+xml"
   href="http://spreadsheets.google.com/feeds/worksheets/key/private/full"/>
  <link rel="alternate" type="text/html"
   href="http://spreadsheets.google.com/ccc?key=key"/>
  <link rel="self" type="application/atom+xml"
   href="http://spreadsheets.google.com/feeds/spreadsheets/private/full/key"/>
  <author>
    <name>Fitzwilliam Darcy</name>
    <email>fitz@gmail.com</email>
  </author>
</entry>"""

WORKSHEETS_FEED = """<feed xmlns="http://www.w3.org/2005/Atom"
    xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/"
    xmlns:gs="http://schemas.google.com/spreadsheets/2006"
    xmlns:gd="http://schemas.google.com/g/2005"
    gd:etag='W/"D0cERnk-eip7ImA9WBBXGEg."'>
  <id>http://spreadsheets.google.com/feeds/worksheets/key/private/full</id>
  <updated>2006-11-17T18:23:45.173Z</updated>
  <title type="text">Groceries R Us</title>
  <link rel="alternate" type="text/html"
    href="http://spreadsheets.google.com/ccc?key=key"/>
  <link rel="http://schemas.google.com/g/2005#feed"
    type="application/atom+xml"
    href="http://spreadsheets.google.com/feeds/worksheets/key/private/full"/>
  <link rel="self" type="application/atom+xml"
    href="http://spreadsheets.google.com/feeds/worksheets/key/private/full"/>
  <link
    rel="http://schemas.google.com/g/2005#post" type="application/atom+xml"
    href="http://spreadsheets.google.com/feeds/worksheets/key/private/full"/>
  <author>
    <name>Fitzwilliam Darcy</name>
    <email>fitz@gmail.com</email>
  </author>
  <openSearch:totalResults>1</openSearch:totalResults>
  <openSearch:startIndex>1</openSearch:startIndex>
  <openSearch:itemsPerPage>1</openSearch:itemsPerPage>
  <entry gd:etag='"YDwqeyI."'>
    <id>http://spreadsheets.google.com/feeds/worksheets/0/private/full/1</id>
    <updated>2006-11-17T18:23:45.173Z</updated>
    <title type="text">Sheet1</title>
    <content type="text">Sheet1</content>
    <link rel="http://schemas.google.com/spreadsheets/2006#listfeed"
      type="application/atom+xml"
      href="http://spreadsheets.google.com/feeds/list/0/1/private/full"/>
    <link rel="http://schemas.google.com/spreadsheets/2006#cellsfeed"
      type="application/atom+xml"
      href="http://spreadsheets.google.com/feeds/cells/0/1/private/full"/>
    <link rel="self" type="application/atom+xml"
      href="http://spreadsheets.google.com/feeds/worksheets/0/private/full/1"/>
    <link rel="edit" type="application/atom+xml"
      href="http://spreadsheets.google.com/.../0/.../1/version"/>
    <gs:rowCount>100</gs:rowCount>
    <gs:colCount>20</gs:colCount>
  </entry>
</feed>"""

NEW_WORKSHEET = """<entry xmlns="http://www.w3.org/2005/Atom"
    xmlns:gs="http://schemas.google.com/spreadsheets/2006">
  <title>Expenses</title>
  <gs:rowCount>50</gs:rowCount>
  <gs:colCount>10</gs:colCount>
</entry>"""

EDIT_WORKSHEET = """<entry>
  <id>
    http://spreadsheets.google.com/feeds/worksheets/k/private/full/w
  </id>
  <updated>2007-07-30T18:51:30.666Z</updated>
  <category scheme="http://schemas.google.com/spreadsheets/2006"
    term="http://schemas.google.com/spreadsheets/2006#worksheet"/>
  <title type="text">Income</title>
  <content type="text">Expenses</content>
  <link rel="http://schemas.google.com/spreadsheets/2006#listfeed"
    type="application/atom+xml"
    href="http://spreadsheets.google.com/feeds/list/k/w/private/full"/>
  <link rel="http://schemas.google.com/spreadsheets/2006#cellsfeed"
    type="application/atom+xml"
    href="http://spreadsheets.google.com/feeds/cells/k/w/private/full"/>
  <link rel="self" type="application/atom+xml"
    href="http://spreadsheets.google.com/feeds/worksheets/k/private/full/w"/>
  <link rel="edit" type="application/atom+xml"
    href="http://spreadsheets.google.com/.../k/private/full/w/v"/>
  <gs:rowCount>45</gs:rowCount>
  <gs:colCount>15</gs:colCount>
</entry>"""

NEW_TABLE = """<entry xmlns="http://www.w3.org/2005/Atom"
    xmlns:gs="http://schemas.google.com/spreadsheets/2006">
  <title type='text'>Table 1</title>
  This is a list of all who have registered to vote and
    whether or not they qualify to vote.
  <gs:worksheet name='Sheet1' />
  <gs:header row='1' />
  <gs:data numRows='0' startRow='2'>
    <gs:column index='B' name='Birthday' />
    <gs:column index='C' name='Age' />
    <gs:column index='A' name='Name' />
    <gs:column index='D' name='CanVote' />
  </gs:data>
</entry>"""

TABLES_FEED = """<?xml version='1.0' encoding='utf-8'?>
<feed xmlns="http://www.w3.org/2005/Atom"
    xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/"
    xmlns:gs="http://schemas.google.com/spreadsheets/2006"
    xmlns:gd="http://schemas.google.com/g/2005"
    gd:etag='W/"DEQHQn84fCt7ImA9WxJTGEU."'>
  <id>
    http://spreadsheets.google.com/feeds/key/tables</id>
  <updated>2009-04-28T02:38:53.134Z</updated>
  <category scheme='http://schemas.google.com/g/2005#kind'
    term='http://schemas.google.com/spreadsheets/2006#table' />
  <title>Sample table and record feed</title>
  <link rel='alternate' type='text/html'
    href='http://spreadsheets.google.com/ccc?key=key' />
  <link rel='http://schemas.google.com/g/2005#feed'
    type='application/atom+xml'
    href='http://spreadsheets.google.com/feeds/key/tables' />
  <link rel='http://schemas.google.com/g/2005#post'
    type='application/atom+xml'
    href='http://spreadsheets.google.com/feeds/key/tables' />
  <link rel='self' type='application/atom+xml'
    href='http://spreadsheets.google.com/feeds/key/tables' />
  <author>
    <name>Liz</name>
    <email>liz@gmail.com</email>
  </author>
  <openSearch:totalResults>2</openSearch:totalResults>
  <openSearch:startIndex>1</openSearch:startIndex>
  <entry gd:etag='"HBcUVgtWASt7ImBq"'>
    <id>
      http://spreadsheets.google.com/feeds/key/tables/0</id>
    <updated>2009-04-28T01:20:32.707Z</updated>
    <app:edited xmlns:app="http://www.w3.org/2007/app">
      2009-04-28T01:20:32.707Z</app:edited>
    <category scheme='http://schemas.google.com/g/2005#kind'
      term='http://schemas.google.com/spreadsheets/2006#table' />
    <title>Table 1</title>
    This is a list of all who have registered to vote and
      whether or not they qualify to vote.
    <content type='application/atom+xml;type=feed'
      src='http://spreadsheets.google.com/feeds/key/records/0' />
    <link rel='self' type='application/atom+xml'
      href='http://spreadsheets.google.com/feeds/key/tables/0' />
    <link rel='edit' type='application/atom+xml'
      href='http://spreadsheets.google.com/feeds/key/tables/0' />
    <gs:worksheet name='Sheet1' />
    <gs:header row='1' />
    <gs:data insertionMode='overwrite' numRows='2' startRow='2'>
      <gs:column index='B' name='Birthday' />
      <gs:column index='C' name='Age' />
      <gs:column index='A' name='Name' />
      <gs:column index='D' name='CanVote' />
    </gs:data>
  </entry>
  <entry gd:etag='"HBcUVgdCGyt7ImBq"'>
    <id>
      http://spreadsheets.google.com/feeds/key/tables/1</id>
    <updated>2009-04-28T01:20:38.313Z</updated>
    <app:edited xmlns:app="http://www.w3.org/2007/app">
      2009-04-28T01:20:38.313Z</app:edited>
    <category scheme='http://schemas.google.com/g/2005#kind'
      term='http://schemas.google.com/spreadsheets/2006#table' />
    <title>Table 2</title>
    List of detailed information about each voter.
    <content type='application/atom+xml;type=feed'
      src='http://spreadsheets.google.com/feeds/key/records/1' />
    <link rel='self' type='application/atom+xml'
      href='http://spreadsheets.google.com/feeds/key/tables/1' />
    <link rel='edit' type='application/atom+xml'
      href='http://spreadsheets.google.com/feeds/key/tables/1' />
    <gs:worksheet name='Sheet1' />
    <gs:header row='30' />
    <gs:data insertionMode='overwrite' numRows='10' startRow='34'>
      <gs:column index='C' name='Last' />
      <gs:column index='B' name='First' />
      <gs:column index='D' name='DOB' />
      <gs:column index='E' name='Driver License?' />
    </gs:data>
  </entry>
</feed>"""

NEW_RECORD = """<entry xmlns="http://www.w3.org/2005/Atom"
    xmlns:gs="http://schemas.google.com/spreadsheets/2006">
  <title>Darcy</title>
  <gs:field name='Birthday'>2/10/1785</gs:field>
  <gs:field name='Age'>28</gs:field>
  <gs:field name='Name'>Darcy</gs:field>
  <gs:field name='CanVote'>No</gs:field>
</entry>"""

RECORDS_FEED = """<?xml version='1.0' encoding='utf-8'?>
<feed xmlns="http://www.w3.org/2005/Atom"
    xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/"
    xmlns:gs="http://schemas.google.com/spreadsheets/2006"
    xmlns:gd="http://schemas.google.com/g/2005"
    gd:etag='W/"DEQHQn84fCt7ImA9WxJTGEU."'>
  <id>http://spreadsheets.google.com/feeds/key/records/0</id>
  <updated>2009-04-28T02:38:53.134Z</updated>
  <category scheme='http://schemas.google.com/g/2005#kind'
    term='http://schemas.google.com/spreadsheets/2006#record' />
  <title>Table 1</title>
  <link rel='alternate' type='text/html'
    href='http://spreadsheets.google.com/pub?key=key' />
  <link rel='http://schemas.google.com/g/2005#feed'
    type='application/atom+xml'
    href='http://spreadsheets.google.com/feeds/key/records/0' />
  <link rel='http://schemas.google.com/g/2005#post'
    type='application/atom+xml'
    href='http://spreadsheets.google.com/feeds/key/records/0' />
  <link rel='self' type='application/atom+xml'
    href='http://spreadsheets.google.com/feeds/key/records/0' />
  <author>
    <name>Liz</name>
    <email>liz@gmail.com</email>
  </author>
  <openSearch:totalResults>2</openSearch:totalResults>
  <openSearch:startIndex>1</openSearch:startIndex>
  <entry gd:etag='"UB8DTlJAKSt7ImA-WkUT"'>
    <id>
      http://spreadsheets.google.com/feeds/key/records/0/cn6ca</id>
    <updated>2009-04-28T02:38:53.134Z</updated>
    <app:edited xmlns:app="http://www.w3.org/2007/app">
      2009-04-28T02:38:53.134Z</app:edited>
    <category scheme='http://schemas.google.com/g/2005#kind'
      term='http://schemas.google.com/spreadsheets/2006#record' />
    <title>Darcy</title>
    <content>Birthday: 2/10/1785, Age: 28, Name: Darcy,
      CanVote: No</content>
    <link rel='self' type='application/atom+xml'
    href='http://spreadsheets.google.com/feeds/key/records/0/cn6ca' />
    <link rel='edit' type='application/atom+xml'
    href='http://spreadsheets.google.com/feeds/key/records/0/cn6ca' />
    <gs:field index='B' name='Birthday'>2/10/1785</gs:field>
    <gs:field index='C' name='Age'>28</gs:field>
    <gs:field index='A' name='Name'>Darcy</gs:field>
    <gs:field index='D' name='CanVote'>No</gs:field>
  </entry>
  <entry gd:etag='"UVBFUEcNRCt7ImA9DU8."'>
    <id>
      http://spreadsheets.google.com/feeds/key/records/0/cokwr</id>
    <updated>2009-04-28T02:38:53.134Z</updated>
    <app:edited xmlns:app="http://www.w3.org/2007/app">
      2009-04-28T02:38:53.134Z</app:edited>
    <category scheme='http://schemas.google.com/g/2005#kind'
      term='http://schemas.google.com/spreadsheets/2006#record' />
    <title>Jane</title>
    <content>Birthday: 1/6/1791, Age: 22, Name: Jane,
      CanVote: Yes</content>
    <link rel='self' type='application/atom+xml'
      href='http://spreadsheets.google.com/feeds/key/records/0/cokwr' />
    <link rel='edit' type='application/atom+xml'
      href='http://spreadsheets.google.com/feeds/key/records/0/cokwr' />
    <gs:field index='B' name='Birthday'>1/6/1791</gs:field>
    <gs:field index='C' name='Age'>22</gs:field>
    <gs:field index='A' name='Name'>Jane</gs:field>
    <gs:field index='D' name='CanVote'>Yes</gs:field>
  </entry>
</feed>"""

LIST_FEED = """<feed xmlns="http://www.w3.org/2005/Atom"
    xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/"
    xmlns:gsx="http://schemas.google.com/spreadsheets/2006/extended"
    xmlns:gd="http://schemas.google.com/g/2005"
    gd:etag='W/"D0cERnk-eip7ImA9WBBXGEg."'>
  <id>
    http://spreadsheets.google.com/feeds/list/key/worksheetId/private/full
  </id>
  <updated>2006-11-17T18:23:45.173Z</updated>
  <title type="text">Sheet1</title>
  <link rel="alternate" type="text/html"
    href="http://spreadsheets.google.com/ccc?key=key"/>
  <link rel="http://schemas.google.com/g/2005#feed"
    type="application/atom+xml"
    href="http://spreadsheets.google.com/feeds/list/k/w/private/full"/>
  <link rel="http://schemas.google.com/g/2005#post"
    type="application/atom+xml"
    href="http://spreadsheets.google.com/feeds/list/k/w/private/full"/>
  <link rel="self" type="application/atom+xml"
    href="http://spreadsheets.google.com/feeds/list/k/w/private/full"/>
  <author>
    <name>Fitzwilliam Darcy</name>
    <email>fitz@gmail.com</email>
  </author>
  <openSearch:totalResults>8</openSearch:totalResults>
  <openSearch:startIndex>1</openSearch:startIndex>
  <openSearch:itemsPerPage>8</openSearch:itemsPerPage>
  <entry gd:etag='"S0wCTlpIIip7ImA0X0QI"'>
    <id>http://spreadsheets.google.com/feeds/list/k/w/private/full/r</id>
    <updated>2006-11-17T18:23:45.173Z</updated>
    <category scheme="http://schemas.google.com/spreadsheets/2006"
      term="http://schemas.google.com/spreadsheets/2006#list"/>
    <title type="text">Bingley</title>
    <content type="text">Hours: 10, Items: 2, IPM: 0.0033</content>
    <link rel="self" type="application/atom+xml"
      href="http://spreadsheets.google.com/feeds/list/k/w/private/full/r"/>
    <link rel="edit" type="application/atom+xml"
      href="http://spreadsheets.google.com/feeds/list/k/w/private/full/r/v"/>
    <gsx:name>Bingley</gsx:name>
    <gsx:hours>10</gsx:hours>
    <gsx:items>2</gsx:items>
    <gsx:ipm>0.0033</gsx:ipm>
  </entry>
  <entry gd:etag='"AxQDSXxjfyp7ImA0ChJVSBI."'>
    <id>
      http://spreadsheets.google.com/feeds/list/k/w/private/full/rowId
    </id>
    <updated>2006-11-17T18:23:45.173Z</updated>
    <category scheme="http://schemas.google.com/spreadsheets/2006"
      term="http://schemas.google.com/spreadsheets/2006#list"/>
    <title type="text">Charlotte</title>
    <content type="text">Hours: 60, Items: 18000, IPM: 5</content>
    <link rel="self" type="application/atom+xml"
      href="http://spreadsheets.google.com/feeds/list/k/w/private/full/r"/>
    <link rel="edit" type="application/atom+xml"
      href="http://spreadsheets.google.com/feeds/list/k/w/private/full/r/v"/>
    <gsx:name>Charlotte</gsx:name>
    <gsx:hours>60</gsx:hours>
    <gsx:items>18000</gsx:items>
    <gsx:ipm>5</gsx:ipm>
  </entry>
</feed>"""

NEW_ROW = """<entry xmlns="http://www.w3.org/2005/Atom"
    xmlns:gsx="http://schemas.google.com/spreadsheets/2006/extended">
  <gsx:hours>1</gsx:hours>
  <gsx:ipm>1</gsx:ipm>
  <gsx:items>60</gsx:items>
  <gsx:name>Elizabeth Bennet</gsx:name>
</entry>"""

UPDATED_ROW = """<entry gd:etag='"S0wCTlpIIip7ImA0X0QI"'
    xmlns="http://www.w3.org/2005/Atom"
    xmlns:gd="http://schemas.google.com/g/2005"
    xmlns:gsx="http://schemas.google.com/spreadsheets/2006/extended">
  <id>http://spreadsheets.google.com/feeds/list/k/w/private/full/rowId</id>
  <updated>2006-11-17T18:23:45.173Z</updated>
  <category scheme="http://schemas.google.com/spreadsheets/2006"
    term="http://schemas.google.com/spreadsheets/2006#list"/>
  <title type="text">Bingley</title>
  <content type="text">Hours: 10, Items: 2, IPM: 0.0033</content>
  <link rel="self" type="application/atom+xml"
    href="http://spreadsheets.google.com/feeds/list/k/w/private/full/r"/>
  <link rel="edit" type="application/atom+xml"
    href="http://spreadsheets.google.com/feeds/list/k/w/private/full/r/v"/>
  <gsx:name>Bingley</gsx:name>
  <gsx:hours>20</gsx:hours>
  <gsx:items>4</gsx:items>
  <gsx:ipm>0.0033</gsx:ipm>
</entry>"""

CELLS_FEED = """<feed xmlns="http://www.w3.org/2005/Atom"
    xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/"
    xmlns:gs="http://schemas.google.com/spreadsheets/2006"
    xmlns:gd="http://schemas.google.com/g/2005"
    gd:etag='W/"D0cERnk-eip7ImA9WBBXGEg."'>
  <id>
    http://spreadsheets.google.com/feeds/cells/key/worksheetId/private/full
  </id>
  <updated>2006-11-17T18:27:32.543Z</updated>
  <title type="text">Sheet1</title>
  <link rel="alternate" type="text/html"
    href="http://spreadsheets.google.com/ccc?key=key"/>
  <link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml"
    href="http://spreadsheets.google.com/feeds/cells/k/w/private/full"/>
  <link rel="http://schemas.google.com/g/2005#post"
    type="application/atom+xml"
  <link rel="http://schemas.google.com/g/2005#batch"
    type="application/atom+xml"
    href="http://spreadsheets.google.com/feeds/cells/k/w/private/full/batch"/>
  <link rel="self" type="application/atom+xml"
    href="http://spreadsheets.google.com/feeds/cells/k/w/private/full"/>
  <author>
    <name>Fitzwilliam Darcy</name>
    <email>fitz@gmail.com</email>
  </author>
  <openSearch:startIndex>1</openSearch:startIndex>
  <openSearch:itemsPerPage>36</openSearch:itemsPerPage>
  <gs:rowCount>100</gs:rowCount>
  <gs:colCount>20</gs:colCount>
  <entry gd:etag='"ImA9D1APFyp7"'>
    <id>
      http://spreadsheets.google.com/feeds/cells/k/w/private/full/R1C1
    </id>
    <updated>2006-11-17T18:27:32.543Z</updated>
    <category scheme="http://schemas.google.com/spreadsheets/2006"
      term="http://schemas.google.com/spreadsheets/2006#cell"/>
    <title type="text">A1</title>
    <content type="text">Name</content>
    <link rel="self" type="application/atom+xml"
      href="http://spreadsheets.google.com/feeds/cells/k/w/pr/full/R1C1"/>
    <link rel="edit" type="application/atom+xml"
      href="http://spreadsheets.google.com/./cells/k/w/pr/full/R1C1/bgvjf"/>
    <gs:cell row="1" col="1" inputValue="Name">Name</gs:cell>
  </entry>
  <entry gd:etag='"YD0PS1YXByp7Ig.."'>
    <id>
      http://spreadsheets.google.com/feeds/cells/k/w/private/full/R1C2
    </id>
    <updated>2006-11-17T18:27:32.543Z</updated>
    <category scheme="http://schemas.google.com/spreadsheets/2006"
      term="http://schemas.google.com/spreadsheets/2006#cell"/>
    <title type="text">B1</title>
    <content type="text">Hours</content>
    <link rel="self" type="application/atom+xml"
      href="http://spreadsheets.google.com/feeds/cells/k/w/pr/full/R1C2"/>
    <link rel="edit" type="application/atom+xml"
      href="http://spreadsheets.google.com/./cells/k/w/pr/full/R1C2/1pn567"/>
    <gs:cell row="1" col="2" inputValue="Hours">Hours</gs:cell>
  </entry>
  <entry gd:etag='"ImB5CBYSRCp7"'>
    <id>
      http://spreadsheets.google.com/feeds/cells/k/w/private/full/R9C4
    </id>
    <updated>2006-11-17T18:27:32.543Z</updated>
    <category scheme="http://schemas.google.com/spreadsheets/2006"
      term="http://schemas.google.com/spreadsheets/2006#cell"/>
    <title type="text">D9</title>
    <content type="text">5</content>
    <link rel="self" type="application/atom+xml"
      href="http://spreadsheets.google.com/feeds/cells/k/w/pr/full/R9C4"/>
    <link rel="edit" type="application/atom+xml"
      href="http://spreadsheets.google.com/./cells/k/w/pr/full/R9C4/srevc"/>
    <gs:cell row="9" col="4"
      inputValue="=FLOOR(R[0]C[-1]/(R[0]C[-2]*60),.0001)"
      numericValue="5.0">5</gs:cell>
  </entry>
</feed>"""

BATCH_CELLS = """<feed xmlns="http://www.w3.org/2005/Atom"
      xmlns:batch="http://schemas.google.com/gdata/batch"
      xmlns:gs="http://schemas.google.com/spreadsheets/2006">
  <id>
    http://spreadsheets.google.com/feeds/cells/key/worksheetId/private/full
  </id>
  <entry>
    <batch:id">A1</batch:id">
    <batch:operation type="update"/>
    <id>
      http://spreadsheets.google.com/feeds/cells/k/w/private/full/cellId
    </id>
    <link rel="edit" type="application/atom+xml"
      href="http://spreadsheets/google.com/./cells/k/w/pr/full/R2C4/v"/>
    <gs:cell row="2" col="4" inputValue="newData"/>
  </entry>
  <entry>
    <batch:id">A2</batch:id">
    <batch:operation type="update"/>
    <title type="text">A2</title>
    <id>
      http://spreadsheets.google.com/feeds/cells/k/w/private/full/cellId
    </id>
    <link rel="edit" type="application/atom+xml"
      href="http://spreadsheets/google.com/feeds/cells/k/w/pr/full/R2C5/v"/>
    <gs:cell row="2" col="5" inputValue="moreInfo"/>
  </entry>
</feed>"""

class SpreadsheetEntryTest(unittest.TestCase):

  def setUp(self):
    self.spreadsheet = atom.core.parse(
        SPREADSHEET, gdata.spreadsheets.data.Spreadsheet)

  def test_check_parsing(self):
    self.assertEqual(self.spreadsheet.etag, '"BxAUSQUJRCp7ImBq"')
    self.assertEqual(self.spreadsheet.id.text,
                     'http://spreadsheets.google.com/feeds/spreadsheets'
                     '/private/full/key')
    self.assertEqual(self.spreadsheet.updated.text,
                     '2006-11-17T18:24:18.231Z')
    self.assertEqual(self.spreadsheet.find_worksheets_feed(),
                     'http://spreadsheets.google.com/feeds/worksheets'
                     '/key/private/full')
    self.assertEqual(self.spreadsheet.find_self_link(),
                     'http://spreadsheets.google.com/feeds/spreadsheets'
                     '/private/full/key')

class ListEntryTest(unittest.TestCase):

  def test_get_and_set_column_value(self):
    row = atom.core.parse(NEW_ROW, gdata.spreadsheets.data.ListEntry)
    row.set_value('hours', '3')
    row.set_value('name', 'Lizzy')
    self.assertEqual(row.get_value('hours'), '3')
    self.assertEqual(row.get_value('ipm'), '1')
    self.assertEqual(row.get_value('items'), '60')
    self.assertEqual(row.get_value('name'), 'Lizzy')
    self.assertEqual(row.get_value('x'), None)
    row.set_value('x', 'Test')
    self.assertEqual(row.get_value('x'), 'Test')
    row_xml = str(row)
    self.assert_(row_xml.find(':x') > -1)
    self.assert_(row_xml.find('>Test</') > -1)
    self.assert_(row_xml.find(':hours') > -1)
    self.assert_(row_xml.find('>3</') > -1)
    self.assert_(row_xml.find(':ipm') > -1)
    self.assert_(row_xml.find('>1</') > -1)
    self.assert_(row_xml.find(':items') > -1)
    self.assert_(row_xml.find('>60</') > -1)
    self.assert_(row_xml.find(':name') > -1)
    self.assert_(row_xml.find('>Lizzy</') > -1)
    self.assertEqual(row_xml.find(':zzz'), -1)
    self.assertEqual(row_xml.find('>foo</'), -1)

  def test_check_parsing(self):
    row = atom.core.parse(NEW_ROW, gdata.spreadsheets.data.ListEntry)
    self.assertEqual(row.get_value('hours'), '1')
    self.assertEqual(row.get_value('ipm'), '1')
    self.assertEqual(row.get_value('items'), '60')
    self.assertEqual(row.get_value('name'), 'Elizabeth Bennet')
    self.assertEqual(row.get_value('none'), None)

    row = atom.core.parse(UPDATED_ROW, gdata.spreadsheets.data.ListEntry)
    self.assertEqual(row.get_value('hours'), '20')
    self.assertEqual(row.get_value('ipm'), '0.0033')
    self.assertEqual(row.get_value('items'), '4')
    self.assertEqual(row.get_value('name'), 'Bingley')
    self.assertEqual(row.get_value('x'), None)
    self.assertEqual(
        row.id.text, 'http://spreadsheets.google.com/feeds/list'
            '/k/w/private/full/rowId')
    self.assertEqual(row.updated.text, '2006-11-17T18:23:45.173Z')
    self.assertEqual(row.content.text, 'Hours: 10, Items: 2, IPM: 0.0033')

class RecordEntryTest(unittest.TestCase):

  def setUp(self):
    self.records = atom.core.parse(
        RECORDS_FEED, gdata.spreadsheets.data.RecordsFeed)

  def test_get_by_index(self):
    self.assertEqual(self.records.entry[0].field[0].index, 'B')
    self.assertEqual(self.records.entry[0].field[0].name, 'Birthday')
    self.assertEqual(self.records.entry[0].field[0].text, '2/10/1785')
    self.assertEqual(self.records.entry[0].value_for_index('B'), '2/10/1785')
    self.assertRaises(gdata.spreadsheets.data.FieldMissing,
                      self.records.entry[0].ValueForIndex, 'E')
    self.assertEqual(self.records.entry[1].value_for_index('D'), 'Yes')

  def test_get_by_name(self):
    self.assertEqual(self.records.entry[0].ValueForName('Birthday'),
                     '2/10/1785')
    self.assertRaises(gdata.spreadsheets.data.FieldMissing,
                      self.records.entry[0].value_for_name, 'Foo')
    self.assertEqual(self.records.entry[1].value_for_name('Age'), '22')

class DataClassSanityTest(unittest.TestCase):

  def test_basic_element_structure(self):
    conf.check_data_classes(self, [
        gdata.spreadsheets.data.Cell, gdata.spreadsheets.data.ColCount,
        gdata.spreadsheets.data.Field, gdata.spreadsheets.data.Column,
        gdata.spreadsheets.data.Data, gdata.spreadsheets.data.Header,
        gdata.spreadsheets.data.RowCount, gdata.spreadsheets.data.Worksheet,
        gdata.spreadsheets.data.Spreadsheet,
        gdata.spreadsheets.data.SpreadsheetsFeed,
        gdata.spreadsheets.data.WorksheetEntry,
        gdata.spreadsheets.data.WorksheetsFeed,
        gdata.spreadsheets.data.Table,
        gdata.spreadsheets.data.TablesFeed,
        gdata.spreadsheets.data.Record,
        gdata.spreadsheets.data.RecordsFeed,
        gdata.spreadsheets.data.ListRow,
        gdata.spreadsheets.data.ListEntry,
        gdata.spreadsheets.data.ListsFeed,
        gdata.spreadsheets.data.CellEntry,
        gdata.spreadsheets.data.CellsFeed])

def suite():
  return conf.build_suite([SpreadsheetEntryTest, DataClassSanityTest,
                           ListEntryTest, RecordEntryTest])

if __name__ == '__main__':
  unittest.main()

redpajama_set_name: RedPajamaGithub


text:
package libcore.java.security.cert;

import com.android.org.bouncycastle.asn1.x509.GeneralName;
import java.io.ByteArrayInputStream;
import java.security.cert.Certificate;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
import java.util.Collection;
import java.util.List;
import junit.framework.TestCase;
import libcore.java.security.TestKeyStore;

public final class SubjectAlternativeNameTest extends TestCase {

    /**
     * The spec doesn't cover this, but we require that IP addresses are
     * formatted consistently with InetAddress.getHostAddress().
     */
    public void testFormatIpv4Address() throws Exception {
        assertEquals("127.0.0.1", formatIpAddress(new byte[]{127, 0, 0, 1}));
    }

    public void testFormatIpv4MappedAddress() throws Exception {
        byte[] mappedAddress = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, 127, 0, 0, 1 };
        assertEquals("127.0.0.1", formatIpAddress(mappedAddress));
    }

    public void testFormatIpv6Address() throws Exception {
        byte[] ipAddress = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 };
        String decoded = formatIpAddress(ipAddress);
        assertTrue(decoded, decoded.equals("::1") || decoded.equals("0:0:0:0:0:0:0:1"));
    }

    private String formatIpAddress(byte[] ipAddress) throws Exception {
        Certificate root = new TestKeyStore.Builder()
                .addSubjectAltNameIpAddress(ipAddress)
                .build()
                .getRootCertificate("RSA");
        X509Certificate javaCertificate = bouncycastleToJava(root);
        Collection<List<?>> subjectAlternativeNames = javaCertificate.getSubjectAlternativeNames();
        assertEquals(1, subjectAlternativeNames.size());
        List<?> subjectAlternativeName = subjectAlternativeNames.iterator().next();
        assertEquals(2, subjectAlternativeName.size());
        assertEquals(GeneralName.iPAddress, subjectAlternativeName.get(0));
        return (String) subjectAlternativeName.get(1);
    }

    private X509Certificate bouncycastleToJava(Certificate certificate) throws Exception {
        byte[] encoded = certificate.getEncoded();
        CertificateFactory factory = CertificateFactory.getInstance("X.509");
        return (X509Certificate) factory.generateCertificate(new ByteArrayInputStream(encoded));
    }
}


text:
<?php

final class PhabricatorChartAxis
  extends Phobject {

  private $minimumValue;
  private $maximumValue;

  public function setMinimumValue($minimum_value) {
    $this->minimumValue = $minimum_value;
    return $this;
  }

  public function getMinimumValue() {
    return $this->minimumValue;
  }

  public function setMaximumValue($maximum_value) {
    $this->maximumValue = $maximum_value;
    return $this;
  }

  public function getMaximumValue() {
    return $this->maximumValue;
  }

}


text:
{% extends "fm_base.html" %}

{% block title %}Logged out{% endblock %}

{% block content %}

Logged out.

{% endblock %}


text:
REG_FIDDLE(Canvas_clipRect_2, 280, 192, false, 0) {
void draw(SkCanvas* canvas) {
    SkPaint paint;
    for (SkClipOp op: { SkClipOp::kIntersect, SkClipOp::kDifference } ) {
        canvas->save();
        canvas->clipRect(SkRect::MakeWH(90, 120), op, false);
        canvas->drawCircle(100, 100, 60, paint);
        canvas->restore();
        canvas->translate(80, 0);
    }
}
}  // END FIDDLE


text:
int main(void) {
	int x = 0144;   // preceding 0 with decimal to specify octal constant
	printf("octal constant: %d\n", x);
	return 0;
}


text:
class UsersController < ApplicationController
  skip_before_action :has_info
  skip_before_action :authenticated, :only => [:new, :create]

  def new
    @user = User.new
  end

  def create
    user = User.new(user_params)
    if user.save
      session[:user_id] = user.user_id
      redirect_to home_dashboard_index_path
    else
      @user = user
      flash[:error] = user.errors.full_messages.to_sentence
      redirect_to :signup
    end
  end

  def account_settings
    @user = current_user
  end

  def update
    message = false

    user = User.where("user_id = '#{params[:user][:user_id]}'")[0]

    if user
      user.skip_user_id_assign = true
      user.skip_hash_password = true
      user.update_attributes(user_params_without_password)
      if !(params[:user][:password].empty?) && (params[:user][:password] == params[:user][:password_confirmation])
        user.skip_hash_password = false
        user.password = params[:user][:password]
      end
      message = true if user.save!
      respond_to do |format|
        format.html { redirect_to user_account_settings_path(:user_id => current_user.user_id) }
        format.json { render :json => {:msg => message ? "success" : "false "} }
      end
    else
      flash[:error] = "Could not update user!"
      redirect_to user_account_settings_path(:user_id => current_user.user_id)
    end
  end

  private

  def user_params
    params.require(:user).permit!
  end

  # unpermitted attributes are ignored in production
  def user_params_without_password
    params.require(:user).permit(:email, :admin, :first_name, :last_name)
  end
end


text:
from oslo_log import log as logging

from designate.quota.base import Quota

LOG = logging.getLogger(__name__)

class NoopQuota(Quota):
    __plugin_name__ = 'noop'

    def _get_quotas(self, context, tenant_id):
        return {}


text:
using System;
using System.Collections.Generic;
using System.IO;
using Newtonsoft.Json;

namespace Nest
{
	public interface IDeleteRoleMappingResponse : IResponse
	{
		[JsonProperty("found")]
		bool Found { get; }
	}

	public class DeleteRoleMappingResponse : ResponseBase, IDeleteRoleMappingResponse
	{
		public bool Found { get; internal set; }
	}

}


text: <!DOCTYPE HTML>


text:
/*
 * ManufacturingInferencer.h
 *
 *  Created on: Apr 9, 2021
 *      Author: pnordstrom
 */

#ifndef MANUFACTURINGINFERENCER_H_
#define MANUFACTURINGINFERENCER_H_

#include "DetectionInferencer.h"
#include "Utility.h"

namespace szd {

class ManufacturingInferencer : public DetectionInferencer {
 public:
  ManufacturingInferencer(const std::string &model_path,
                          const std::string &label_path, const float threshold,
                          const std::string &keepout_path);
  ManufacturingInferencer() = delete;
  ManufacturingInferencer(const ManufacturingInferencer &other) = delete;
  ManufacturingInferencer(ManufacturingInferencer &&other) = delete;
  ManufacturingInferencer& operator=(const ManufacturingInferencer &other) = delete;
  ManufacturingInferencer& operator=(ManufacturingInferencer &&other) = delete;
  virtual ~ManufacturingInferencer();

  InferencerType GetInferencerType() override {
    return kManufacturing;
  }
  Utility::Polygon GetKeepOut() {
    return keepout_polygon_;
  }

 private:
  static Utility::Polygon ParseKeepoutPolygon(const std::string &file_path);
  Utility::Polygon keepout_polygon_;
};

} /* namespace szd */

#endif /* MANUFACTURINGINFERENCER_H_ */


text:
package org.apache.solr.handler.component;

import org.apache.solr.cloud.CloudDescriptor;
import org.apache.solr.common.SolrException;
import org.apache.solr.core.SolrCore;
import org.apache.solr.handler.component.ResponseBuilder;
import org.apache.solr.sentry.SentryIndexAuthorizationSingleton;
import org.apache.solr.sentry.SentryTestBase;
import org.apache.solr.sentry.SentrySingletonTestInstance;
import org.apache.solr.request.SolrQueryRequest;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;

/**
 * Test for QueryIndexAuthorizationComponent
 */
public class QueryIndexAuthorizationComponentTest extends SentryTestBase {
  private static SolrCore core;
  private static CloudDescriptor cloudDescriptor;
  private static SentryIndexAuthorizationSingleton sentryInstance;

  @BeforeClass
  public static void beforeClass() throws Exception {
    core = createCore("solrconfig.xml", "schema-minimal.xml");
    // store the CloudDescriptor, because we will overwrite it with a mock
    // and restore it later
    cloudDescriptor = core.getCoreDescriptor().getCloudDescriptor();
    sentryInstance = SentrySingletonTestInstance.getInstance().getSentryInstance();
  }

  @AfterClass
  public static void afterClass() throws Exception {
    closeCore(core, cloudDescriptor);
    core = null;
    cloudDescriptor = null;
  }

  @Override
  public void setUp() throws Exception {
    super.setUp(core);
  }

  private void doExpectUnauthorized(SearchComponent component,
      ResponseBuilder rb, String msgContains) throws Exception {
    try {
      component.prepare(rb);
      Assert.fail("Expected SolrException");
    } catch (SolrException ex) {
      assertEquals(ex.code(), SolrException.ErrorCode.UNAUTHORIZED.code);
      assertTrue(ex.getMessage().contains(msgContains));
    }
  }

  private void doExpectComponentUnauthorized(SearchComponent component,
      String collection, String user) throws Exception {
    ResponseBuilder responseBuilder = getResponseBuilder();
    prepareCollAndUser(core, responseBuilder.req, collection, user);
    doExpectUnauthorized(component, responseBuilder,
      "User " + user + " does not have privileges for " + collection);
  }

  private ResponseBuilder getResponseBuilder() {
    SolrQueryRequest request = getRequest();
    return new ResponseBuilder(request, null, null);
  }

  /**
   * Test the QueryIndexAuthorizationComponent on a collection that
   * the user has ALL access
   */
  @Test
  public void testQueryComponentAccessAll() throws Exception {
    ResponseBuilder responseBuilder = getResponseBuilder();
    prepareCollAndUser(core, responseBuilder.req, "collection1", "junit");
    QueryIndexAuthorizationComponent query = new QueryIndexAuthorizationComponent(sentryInstance);
    query.prepare(responseBuilder);
  }

  /**
   * Test the QueryIndexAuthorizationComponent on a collection that
   * the user has QUERY only access
   */
  @Test
  public void testQueryComponentAccessQuery() throws Exception {
    ResponseBuilder responseBuilder = getResponseBuilder();
    prepareCollAndUser(core, responseBuilder.req, "queryCollection", "junit");
    QueryIndexAuthorizationComponent query = new QueryIndexAuthorizationComponent(sentryInstance);
    query.prepare(responseBuilder);
  }

  /**
   * Test the QueryIndexAuthorizationComponent on a collection that
   * the user has UPDATE only access
   */
  @Test
  public void testQueryComponentAccessUpdate() throws Exception {
    doExpectComponentUnauthorized(new QueryIndexAuthorizationComponent(sentryInstance),
      "updateCollection", "junit");
  }

  /**
   * Test the QueryIndexAuthorizationComponent on a collection that
   * the user has no access
   */
  @Test
  public void testQueryComponentAccessNone() throws Exception {
    doExpectComponentUnauthorized(new QueryIndexAuthorizationComponent(sentryInstance),
      "noAccessCollection", "junit");
  }
}


text:
namespace MingwCommon
{
    /// <summary>
    /// Abstract base class for all Mingw compilers
    /// </summary>
    abstract class CompilerBase :
        C.CompilerTool
    {
        protected CompilerBase()
        {
            this.InheritedEnvironmentVariables.Add("TEMP");

            var mingwMeta = Bam.Core.Graph.Instance.PackageMetaData<Mingw.MetaData>("Mingw");
            var discovery = mingwMeta as C.IToolchainDiscovery;
            discovery.Discover(depth: null);

            this.Version = null; // TODO

            this.Macros.AddVerbatim("CompilerSuffix", mingwMeta.ToolSuffix);

            this.Macros.Add("BinPath", this.CreateTokenizedString(@"$(0)\bin", mingwMeta["InstallDir"] as Bam.Core.TokenizedString));
            this.Macros.Add("CompilerPath", this.CreateTokenizedString(@"$(BinPath)\mingw32-gcc$(CompilerSuffix).exe"));
            this.Macros.AddVerbatim(C.ModuleMacroNames.ObjectFileExtension, ".o");

            this.EnvironmentVariables.Add("PATH", new Bam.Core.TokenizedStringArray(this.Macros["BinPath"]));
        }

        /// <summary>
        /// Executable path to tool
        /// </summary>
        public override Bam.Core.TokenizedString Executable => this.Macros["CompilerPath"];

        /// <summary>
        /// Command line switch to use response file
        /// </summary>
        public override string UseResponseFileOption => "@";
    }

    /// <summary>
    /// 32-bit C compiler
    /// </summary>
    [C.RegisterCCompiler("Mingw", Bam.Core.EPlatform.Windows, C.EBit.ThirtyTwo)]
    class Compiler32 :
        CompilerBase
    {
        /// <summary>
        /// \copydoc Bam.Core.ITool.SettingsType
        /// </summary>
        public override System.Type SettingsType => typeof(Mingw.CCompilerSettings);
    }

    /// <summary>
    /// 32-bit C++ compiler
    /// </summary>
    [C.RegisterCxxCompiler("Mingw", Bam.Core.EPlatform.Windows, C.EBit.ThirtyTwo)]
    sealed class Compiler32Cxx :
        Compiler32
    {
        public Compiler32Cxx() => this.Macros.Add("CompilerPath", this.CreateTokenizedString(@"$(BinPath)\mingw32-g++.exe"));

        /// <summary>
        /// \copydoc Bam.Core.ITool.SettingsType
        /// </summary>
        public override System.Type SettingsType => typeof(Mingw.CxxCompilerSettings);
    }
}


text:
'use strict';

angular.module('rvplusplus')
  .controller('BasketCtrl', function ($scope, Restangular, $stateParams) {
  	$scope.searchedProduct = null;

    $scope.basket = {products:[]};
    Restangular.all('products').getList().then(function(products){
      $scope.products = products;
    });
      // Instantiate the bloodhound suggestion engine
  var products = new Bloodhound({
    datumTokenizer: function(d) { return Bloodhound.tokenizers.whitespace(d.num); },
    queryTokenizer: Bloodhound.tokenizers.whitespace,
    remote: '/api/products?conditions={"name":{"$regex":"^%QUERY", "$options":"i"}}',
  });

  // initialize the bloodhound suggestion engine
  products.initialize();

  // Typeahead options object
  $scope.productSearchOptions = {
    highlight: true
  };

  // Single dataset example
  $scope.productsDataset = {
    displayKey: 'name',
    source: products.ttAdapter()
  };

  var patt = new RegExp('^[0-9]+$');
  $scope.$watch('searchedProduct', function(){
  	if($scope.searchedProduct && $scope.searchedProduct._id !== undefined){
      var pr = _.find($scope.basket.products, function(line){
            return line.product._id === $scope.searchedProduct._id;
          });
      if(pr !== undefined){
        pr.count++;
      }else{
  		  $scope.basket.products.push({product:$scope.searchedProduct, count:1});
      }
  		$scope.searchedProduct = '';
  	}
	if (patt.test($scope.searchedProduct)) {
		var code = $scope.searchedProduct.toString();
		if(code.length < 2) {return;}
		var checkmark = parseInt(code[code.length-1]);
		var weights = [3, 1];
		var sum = 0;
		var i = code.length - 2;
		var add = (i % 2 === 0) ? 0 : 1;
		for (; i >= 0; i--) {
			sum += (parseInt(code[i]) * weights[ (i + add) % 2]);
		}

		var checksum = 10 - sum % 10;
		if(checksum === checkmark){
			Restangular.all('products').getList({conditions: JSON.stringify({'eanCodes': $scope.searchedProduct})}).then(function(products){
        if(products && products.length >= 1){
          var pr = _.find($scope.basket.products, function(line){
            return line.product._id === products[0]._id;
          });
          if(pr !== undefined){
            pr.count++;
          }else{
  				  $scope.basket.products.push({product:products[0], count:1});
          }
				  $scope.searchedProduct = '';
        }
			});
		}
	}
  });
  $scope.searchedProduct = $stateParams.q ? $stateParams.q : null;
  //console.log($scope.searchedProduct);
  $scope.deleteFromBasket = function (line) {
  	$scope.basket.products = _.without($scope.basket.products, line);
  };
  $scope.basketPrice = function () {
    var sum = 0;
    $scope.basket.products.forEach(function(line){
      sum += line.count * line.product.price;
    });
    return sum;
  };
});


text:
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Vendor extends CI_Controller {
	function __construct()
	{
			parent::__construct();
			$this->load->model('vendor_model');
	}
	/**
	 * Index Page for this controller.
	 *
	 * Maps to the following URL
	 * 		http://example.com/index.php/welcome
	 *	- or -
	 * 		http://example.com/index.php/welcome/index
	 *	- or -
	 * Since this controller is set as the default controller in
	 * config/routes.php, it's displayed at http://example.com/
	 *
	 * So any other public methods not prefixed with an underscore will
	 * map to /index.php/welcome/<method_name>
	 * @see https://codeigniter.com/user_guide/general/urls.html
	 */
	public function index()
	{
		$this->load->helper('url');
		$this->load->view('vendor/index.php');
	}

	public function detail()
	{
		$vendor_id = $this->uri->segment(3);
		$data['get_all_vendor_type'] = $this->vendor_model->get_all_vendor_type();
		$data['get_vendor_by_id'] = $this->vendor_model->get_vendor_by_id($vendor_id);
		$vendor_type =  $data['get_vendor_by_id']['Vendor_type'];
		$data['get_all_vendor_services'] = $this->vendor_model->get_all_vendor_services($vendor_id);
		//$vendor_type =
		$this->load->helper('url');
		$this->load->view('vendor/detail.php',$data);
	}

	public function search()
	{
		$vendor_type = $this->input->post('vendor_type');
		$vendor_city = $this->input->post('city');
		if(isset($vendor_type) && count($vendor_type)>0 && isset($vendor_city) && count($vendor_city) > 0)
		{
			$data['get_all_vendor_type'] = $this->vendor_model->get_all_vendor_type();
			$data['listing'] = $this->vendor_model->get_all_vendor_by_type_city($vendor_type,$vendor_city);
			$data['vendor_type'] = $vendor_type;
			$data['city'] = $vendor_city;
			$this->load->view('vendor/index.php',$data);
			//var_dump($listing);
			//exit();
		}
		else {
			$vendor_type = $this->input->get('vendor_type');
			if(isset($vendor_type) && count($vendor_type)>0)
			{
				$data['get_all_vendor_type'] = $this->vendor_model->get_all_vendor_type();
				$data['listing'] = $this->vendor_model->get_all_vendor_by_type($vendor_type);
				$data['vendor_type'] = $vendor_type;
				$this->load->view('vendor/index.php',$data);
				//var_dump($listing);
				//exit();
			}
			else {
				redirect('welcome');
			}

		}
	}

	public function get_vendor_services()
	{
		$vendor_type = $this->input->post('vendor_type_id');
		echo json_encode($this->vendor_model->get_vendor_services($vendor_type));
	}
}


text:
module Refinery
  module PhotoGallery
    class Version
      @major = 0
      @minor = 0
      @tiny  = '5.dev'

      class << self
        attr_reader :major, :minor, :tiny

        def to_s
          [@major, @minor, @tiny].compact.join('.')
        end
      end
    end
  end
end


text:
package com.dremio.exec.compile.sig;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Describes the field will provide output from the given function.
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD})
public @interface RuntimeOverridden {
}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

        <title>OR-Tools</title>
        <meta http-equiv="Content-Type" content="text/html;"/>
        <meta charset="utf-8"/>

        <link href="doxygen.css" rel="stylesheet" type="text/css" />
        <link href="styleSheet.tmp.css" rel="stylesheet" type="text/css"/>

                Google OR-Tools 9.4

C++ Reference

Algorithms

CP-SAT

Graph

Routing

Linear solver

C++ Reference: Routing

Classes |
Namespaces |
Enumerations

routing_lp_scheduling.h File Reference

Go to the source code of this file.

Classes

class  	CumulBoundsPropagator

class  	RoutingLinearSolverWrapper

class  	RoutingGlopWrapper

class  	RoutingCPSatWrapper

class  	DimensionCumulOptimizerCore

class  	LocalDimensionCumulOptimizer

class  	GlobalDimensionCumulOptimizer

class  	ResourceAssignmentOptimizer

Namespaces

namespace  	operations_research

 	Collection of objects used to extend the Constraint Solver library.

Enumerations

enum class  	DimensionSchedulingStatus { OPTIMAL
, RELAXED_OPTIMAL_ONLY
, INFEASIBLE
 }