| /******************************************************************************* |
| * Copyright (c) 2018 Agence spatiale canadienne / Canadian Space Agency |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| <<<<<<< HEAD |
| * Contributors: |
| * Pierre Allard - initial API and implementation |
| * Regent L'Archeveque |
| * |
| ======= |
| * Contributors: |
| * Pierre Allard, |
| * Regent L'Archeveque - initial API and implementation |
| * |
| >>>>>>> refs/heads/eclipse_pa |
| * SPDX-License-Identifier: EPL-1.0 |
| *******************************************************************************/ |
| package org.eclipse.apogy.examples.satellite.converters; |
| |
| import org.eclipse.apogy.common.converters.IConverter; |
| import org.eclipse.apogy.core.environment.earth.EarthSurfaceLocation; |
| import org.eclipse.apogy.examples.satellite.ObservationConstellationRequest; |
| |
| public class ObservationConstellationRequestToEarthSurfaceLocationConverter implements IConverter { |
| |
| @Override |
| public boolean canConvert(Object arg0) { |
| return ((ObservationConstellationRequest) arg0).getLocation() != null; |
| } |
| |
| @Override |
| public Object convert(Object arg0) throws Exception { |
| return ((ObservationConstellationRequest) arg0).getLocation(); |
| } |
| |
| @Override |
| public Class<?> getInputType() { |
| return ObservationConstellationRequest.class; |
| } |
| |
| @Override |
| public Class<?> getOutputType() { |
| return EarthSurfaceLocation.class; |
| } |
| } |