simplify module names e.g. taverna-gis-activiy
Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-plugin-gis/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-plugin-gis/commit/06fe487d Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-plugin-gis/tree/06fe487d Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-plugin-gis/diff/06fe487d Branch: refs/heads/master Commit: 06fe487df64d0d4c7066a6ebdb5d5e3d51161901 Parents: c0ec3d1 Author: Stian Soiland-Reyes <[email protected]> Authored: Mon Jul 11 14:53:30 2016 +0100 Committer: Stian Soiland-Reyes <[email protected]> Committed: Mon Jul 11 14:53:30 2016 +0100 ---------------------------------------------------------------------- apache-taverna-activity-gis-activity-ui/pom.xml | 123 ----------- .../gis/ui/config/GisConfigurationPanel.java | 104 --------- .../gis/ui/config/GisConfigureAction.java | 66 ------ .../gis/ui/menu/GisConfigureMenuAction.java | 84 -------- .../gis/ui/serviceprovider/GisServiceDesc.java | 115 ---------- .../gis/ui/serviceprovider/GisServiceIcon.java | 57 ----- .../ui/serviceprovider/GisServiceProvider.java | 204 ------------------ .../ui/view/GisActivityContextViewFactory.java | 79 ------- .../taverna/gis/ui/view/GisContextualView.java | 108 ---------- .../resources/META-INF/spring/context-osgi.xml | 44 ---- .../main/resources/META-INF/spring/context.xml | 49 ----- .../src/main/resources/exampleIcon.png | Bin 541 -> 0 bytes apache-taverna-activity-gis-activity/pom.xml | 75 ------- .../org/apache/taverna/gis/GisActivity.java | 177 ---------------- .../gis/GisActivityConfigurationBean.java | 72 ------- .../apache/taverna/gis/GisActivityExample.java | 152 ------------- .../apache/taverna/gis/GisActivityFactory.java | 114 ---------- .../taverna/gis/GisActivityHealthChecker.java | 83 -------- .../src/main/resources/schema.json | 25 --- .../src/main/resources/spring/context-osgi.xml | 35 --- .../src/main/resources/spring/context.xml | 30 --- .../src/main/resources/wps_config.xml | 212 ------------------- .../taverna/gis/GisActivityFactoryTest.java | 120 ----------- .../org/apache/taverna/gis/GisActivityTest.java | 93 -------- apache-taverna-activity-gis-plugin/pom.xml | 50 ----- pom.xml | 8 +- taverna-gis-activity-ui/pom.xml | 123 +++++++++++ .../gis/ui/config/GisConfigurationPanel.java | 104 +++++++++ .../gis/ui/config/GisConfigureAction.java | 66 ++++++ .../gis/ui/menu/GisConfigureMenuAction.java | 84 ++++++++ .../gis/ui/serviceprovider/GisServiceDesc.java | 115 ++++++++++ .../gis/ui/serviceprovider/GisServiceIcon.java | 57 +++++ .../ui/serviceprovider/GisServiceProvider.java | 204 ++++++++++++++++++ .../ui/view/GisActivityContextViewFactory.java | 79 +++++++ .../taverna/gis/ui/view/GisContextualView.java | 108 ++++++++++ .../resources/META-INF/spring/context-osgi.xml | 44 ++++ .../main/resources/META-INF/spring/context.xml | 49 +++++ .../src/main/resources/exampleIcon.png | Bin 0 -> 541 bytes taverna-gis-activity/pom.xml | 75 +++++++ .../org/apache/taverna/gis/GisActivity.java | 177 ++++++++++++++++ .../gis/GisActivityConfigurationBean.java | 72 +++++++ .../apache/taverna/gis/GisActivityExample.java | 152 +++++++++++++ .../apache/taverna/gis/GisActivityFactory.java | 114 ++++++++++ .../taverna/gis/GisActivityHealthChecker.java | 83 ++++++++ .../src/main/resources/schema.json | 25 +++ .../src/main/resources/spring/context-osgi.xml | 35 +++ .../src/main/resources/spring/context.xml | 30 +++ .../src/main/resources/wps_config.xml | 212 +++++++++++++++++++ .../taverna/gis/GisActivityFactoryTest.java | 120 +++++++++++ .../org/apache/taverna/gis/GisActivityTest.java | 93 ++++++++ taverna-gis-plugin/pom.xml | 50 +++++ 51 files changed, 2275 insertions(+), 2275 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-taverna-plugin-gis/blob/06fe487d/apache-taverna-activity-gis-activity-ui/pom.xml ---------------------------------------------------------------------- diff --git a/apache-taverna-activity-gis-activity-ui/pom.xml b/apache-taverna-activity-gis-activity-ui/pom.xml deleted file mode 100644 index 3619a02..0000000 --- a/apache-taverna-activity-gis-activity-ui/pom.xml +++ /dev/null @@ -1,123 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.taverna.gis</groupId> - <artifactId>apache-taverna-plugin-gis</artifactId> - <version>0.0.1-incubating-SNAPSHOT</version> - </parent> - <artifactId>taverna-gis-activity-ui</artifactId> - <packaging>bundle</packaging> - <name>Gis Taverna activity UI</name> - - <dependencies> - <dependency> - <groupId>${project.parent.groupId}</groupId> - <artifactId>taverna-gis-client</artifactId> - <version>${project.parent.version}</version> - </dependency> - - <dependency> - <groupId>org.apache.taverna.engine</groupId> - <artifactId>taverna-workflowmodel-api</artifactId> - <version>${taverna.engine.version}</version> - </dependency> - <dependency> - <groupId>org.apache.taverna.engine</groupId> - <artifactId>taverna-reference-api</artifactId> - <version>${taverna.engine.version}</version> - </dependency> - - <dependency> - <groupId>com.fasterxml.jackson.core</groupId> - <artifactId>jackson-databind</artifactId> - <version>2.3.0</version> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.4</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.apache.taverna.engine</groupId> - <artifactId>taverna-workflowmodel-impl</artifactId> - <version>${taverna.engine.version}</version> - <scope>test</scope> - </dependency> - - - <dependency> - <groupId>org.apache.taverna.workbench</groupId> - <artifactId>taverna-activity-palette-api</artifactId> - <version>${taverna.workbench.version}</version> - </dependency> - <dependency> - <groupId>org.apache.taverna.workbench</groupId> - <artifactId>taverna-edits-api</artifactId> - <version>${taverna.workbench.version}</version> - </dependency> - <dependency> - <groupId>org.apache.taverna.workbench</groupId> - <artifactId>taverna-selection-api</artifactId> - <version>${taverna.workbench.version}</version> - </dependency> - - <dependency> - <groupId>org.apache.taverna.workbench</groupId> - <artifactId>taverna-menu-api</artifactId> - <version>${taverna.workbench.version}</version> - </dependency> - <dependency> - <groupId>org.apache.taverna.workbench</groupId> - <artifactId>taverna-activity-icons-api</artifactId> - <version>${taverna.workbench.version}</version> - </dependency> - <dependency> - <groupId>org.apache.taverna.workbench</groupId> - <artifactId>taverna-helper-api</artifactId> - <version>${taverna.workbench.version}</version> - </dependency> - <dependency> - <groupId>org.apache.taverna.workbench</groupId> - <artifactId>taverna-ui</artifactId> - <version>${taverna.workbench.version}</version> - </dependency> - <dependency> - <groupId>org.apache.taverna.workbench</groupId> - <artifactId>taverna-configuration-ui-api</artifactId> - <version>${taverna.workbench.version}</version> - </dependency> - <dependency> - <groupId>org.apache.taverna.workbench</groupId> - <artifactId>taverna-contextual-views-api</artifactId> - <version>${taverna.workbench.version}</version> - </dependency> - <dependency> - <groupId>org.apache.taverna.workbench</groupId> - <artifactId>taverna-activity-tools</artifactId> - <version>${taverna.workbench.version}</version> - </dependency> - - </dependencies> -</project> http://git-wip-us.apache.org/repos/asf/incubator-taverna-plugin-gis/blob/06fe487d/apache-taverna-activity-gis-activity-ui/src/main/java/org/apache/taverna/gis/ui/config/GisConfigurationPanel.java ---------------------------------------------------------------------- diff --git a/apache-taverna-activity-gis-activity-ui/src/main/java/org/apache/taverna/gis/ui/config/GisConfigurationPanel.java b/apache-taverna-activity-gis-activity-ui/src/main/java/org/apache/taverna/gis/ui/config/GisConfigurationPanel.java deleted file mode 100644 index 15c0cfd..0000000 --- a/apache-taverna-activity-gis-activity-ui/src/main/java/org/apache/taverna/gis/ui/config/GisConfigurationPanel.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -package org.apache.taverna.gis.ui.config; - -import java.awt.GridLayout; -import java.net.URI; - -import javax.swing.JLabel; -import javax.swing.JOptionPane; -import javax.swing.JTextField; - -import org.apache.taverna.workbench.ui.views.contextualviews.activity.ActivityConfigurationPanel; - -import org.apache.taverna.services.ServiceRegistry; -import org.apache.taverna.scufl2.api.activity.Activity; - -@SuppressWarnings("serial") -public class GisConfigurationPanel extends ActivityConfigurationPanel { - - private final ServiceRegistry serviceRegistry; - - private JTextField fieldString; - private JTextField fieldURI; - - public GisConfigurationPanel(Activity activity, ServiceRegistry serviceRegistry) { - super(activity); - this.serviceRegistry = serviceRegistry; - initialise(); - } - - protected void initialise() { - // call super.initialise() to initialise the configuration - super.initialise(); - - removeAll(); - setLayout(new GridLayout(0, 2)); - - // FIXME: Create GUI depending on activity configuration bean - JLabel labelString = new JLabel("Example string:"); - add(labelString); - fieldString = new JTextField(20); - add(fieldString); - labelString.setLabelFor(fieldString); - - JLabel labelURI = new JLabel("Example URI:"); - add(labelURI); - fieldURI = new JTextField(25); - add(fieldURI); - labelURI.setLabelFor(fieldURI); - - // Populate fields from activity configuration - fieldString.setText(getProperty("exampleString")); - fieldURI.setText(getProperty("exampleUri")); - } - - /** - * Check that user values in UI are valid - */ - @Override - public boolean checkValues() { - try { - URI.create(fieldURI.getText()); - } catch (IllegalArgumentException ex) { - JOptionPane.showMessageDialog(this, ex.getCause().getMessage(), - "Invalid URI", JOptionPane.ERROR_MESSAGE); - // Not valid, return false - return false; - } - // All valid, return true - return true; - } - - /** - * Set the configuration properties from the UI - */ - @Override - public void noteConfiguration() { - // FIXME: Update bean fields from your UI elements - setProperty("exampleString", fieldString.getText()); - setProperty("exampleUri", fieldURI.getText()); - - configureInputPorts(serviceRegistry); - configureOutputPorts(serviceRegistry); - } - -} http://git-wip-us.apache.org/repos/asf/incubator-taverna-plugin-gis/blob/06fe487d/apache-taverna-activity-gis-activity-ui/src/main/java/org/apache/taverna/gis/ui/config/GisConfigureAction.java ---------------------------------------------------------------------- diff --git a/apache-taverna-activity-gis-activity-ui/src/main/java/org/apache/taverna/gis/ui/config/GisConfigureAction.java b/apache-taverna-activity-gis-activity-ui/src/main/java/org/apache/taverna/gis/ui/config/GisConfigureAction.java deleted file mode 100644 index c968fea..0000000 --- a/apache-taverna-activity-gis-activity-ui/src/main/java/org/apache/taverna/gis/ui/config/GisConfigureAction.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -package org.apache.taverna.gis.ui.config; - -import java.awt.event.ActionEvent; - -import org.apache.taverna.services.ServiceRegistry; -import org.apache.taverna.scufl2.api.activity.Activity; - -import org.apache.taverna.servicedescriptions.ServiceDescriptionRegistry; -import org.apache.taverna.workbench.activityicons.ActivityIconManager; -import org.apache.taverna.workbench.edits.EditManager; -import org.apache.taverna.workbench.file.FileManager; -import org.apache.taverna.workbench.ui.actions.activity.ActivityConfigurationAction; -import org.apache.taverna.workbench.ui.views.contextualviews.activity.ActivityConfigurationDialog; - -@SuppressWarnings("serial") -public class GisConfigureAction extends ActivityConfigurationAction { - - private final EditManager editManager; - private final FileManager fileManager; - private final ServiceRegistry serviceRegistry; - - public GisConfigureAction(Activity activity, - EditManager editManager, FileManager fileManager, - ActivityIconManager activityIconManager, - ServiceDescriptionRegistry serviceDescriptionRegistry, - ServiceRegistry serviceRegistry) { - super(activity, activityIconManager, serviceDescriptionRegistry); - this.editManager = editManager; - this.fileManager = fileManager; - this.serviceRegistry = serviceRegistry; - } - - public void actionPerformed(ActionEvent e) { - ActivityConfigurationDialog currentDialog = getDialog(getActivity()); - if (currentDialog != null) { - currentDialog.toFront(); - return; - } - - GisConfigurationPanel panel = new GisConfigurationPanel(getActivity(), serviceRegistry); - ActivityConfigurationDialog dialog = new ActivityConfigurationDialog(getActivity(), panel, editManager); - - setDialog(getActivity(), dialog, fileManager); - } - -} http://git-wip-us.apache.org/repos/asf/incubator-taverna-plugin-gis/blob/06fe487d/apache-taverna-activity-gis-activity-ui/src/main/java/org/apache/taverna/gis/ui/menu/GisConfigureMenuAction.java ---------------------------------------------------------------------- diff --git a/apache-taverna-activity-gis-activity-ui/src/main/java/org/apache/taverna/gis/ui/menu/GisConfigureMenuAction.java b/apache-taverna-activity-gis-activity-ui/src/main/java/org/apache/taverna/gis/ui/menu/GisConfigureMenuAction.java deleted file mode 100644 index 2c8065d..0000000 --- a/apache-taverna-activity-gis-activity-ui/src/main/java/org/apache/taverna/gis/ui/menu/GisConfigureMenuAction.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -package org.apache.taverna.gis.ui.menu; - -import java.net.URI; - -import javax.swing.Action; - -import org.apache.taverna.services.ServiceRegistry; - -import org.apache.taverna.servicedescriptions.ServiceDescriptionRegistry; -import org.apache.taverna.ui.menu.ContextualMenuComponent; -import org.apache.taverna.ui.menu.MenuComponent; -import org.apache.taverna.workbench.activityicons.ActivityIconManager; -import org.apache.taverna.workbench.activitytools.AbstractConfigureActivityMenuAction; -import org.apache.taverna.workbench.edits.EditManager; -import org.apache.taverna.workbench.file.FileManager; - -import org.apache.taverna.gis.ui.config.GisConfigureAction; - -public class GisConfigureMenuAction extends AbstractConfigureActivityMenuAction implements - MenuComponent, ContextualMenuComponent { - - private static final URI ACTIVITY_TYPE = URI - .create("http://example.com/2013/activity/apache-taverna-activity-gis"); - - private EditManager editManager; - private FileManager fileManager; - private ActivityIconManager activityIconManager; - private ServiceDescriptionRegistry serviceDescriptionRegistry; - private ServiceRegistry serviceRegistry; - - public GisConfigureMenuAction() { - super(ACTIVITY_TYPE); - } - - @Override - protected Action createAction() { - Action result = new GisConfigureAction(findActivity(), editManager, fileManager, - activityIconManager, serviceDescriptionRegistry, serviceRegistry); - result.putValue(Action.NAME, "Configure example service"); - addMenuDots(result); - return result; - } - - public void setEditManager(EditManager editManager) { - this.editManager = editManager; - } - - public void setFileManager(FileManager fileManager) { - this.fileManager = fileManager; - } - - public void setActivityIconManager(ActivityIconManager activityIconManager) { - this.activityIconManager = activityIconManager; - } - - public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) { - this.serviceDescriptionRegistry = serviceDescriptionRegistry; - } - - public void setServiceRegistry(ServiceRegistry serviceRegistry) { - this.serviceRegistry = serviceRegistry; - } - -} http://git-wip-us.apache.org/repos/asf/incubator-taverna-plugin-gis/blob/06fe487d/apache-taverna-activity-gis-activity-ui/src/main/java/org/apache/taverna/gis/ui/serviceprovider/GisServiceDesc.java ---------------------------------------------------------------------- diff --git a/apache-taverna-activity-gis-activity-ui/src/main/java/org/apache/taverna/gis/ui/serviceprovider/GisServiceDesc.java b/apache-taverna-activity-gis-activity-ui/src/main/java/org/apache/taverna/gis/ui/serviceprovider/GisServiceDesc.java deleted file mode 100644 index c9a93f0..0000000 --- a/apache-taverna-activity-gis-activity-ui/src/main/java/org/apache/taverna/gis/ui/serviceprovider/GisServiceDesc.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -package org.apache.taverna.gis.ui.serviceprovider; - -import java.net.URI; -import java.util.Arrays; -import java.util.List; - -import javax.swing.Icon; - -import org.apache.taverna.scufl2.api.configurations.Configuration; -import org.apache.taverna.servicedescriptions.ServiceDescription; - -import com.fasterxml.jackson.databind.node.ObjectNode; - -public class GisServiceDesc extends ServiceDescription { - public static final URI ACTIVITY_TYPE = URI - .create("http://ns.taverna.org.uk/2016/activity/gis"); - - - /** - * The type of Activity which should be instantiated when adding a service - * for this description - */ - @Override - public URI getActivityType() { - return ACTIVITY_TYPE; - } - - @Override - public Configuration getActivityConfiguration() { - Configuration configuration = new Configuration(); - configuration.setType(ACTIVITY_TYPE.resolve("#Config")); - ObjectNode json = configuration.getJsonAsObjectNode(); - json.put("ogcServiceUri", ogcServiceUri.toASCIIString()); - json.put("processIdentifier", processIdentifier); - return configuration; - } - - /** - * An icon to represent this service description in the service palette. - */ - @Override - public Icon getIcon() { - return GisServiceIcon.getIcon(); - } - - /** - * The display name that will be shown in service palette and will - * be used as a template for processor name when added to workflow. - */ - @Override - public String getName() { - return processIdentifier; - } - - /** - * The path to this service description in the service palette. Folders - * will be created for each element of the returned path. - */ - @Override - public List<String> getPath() { - // For deeper paths you may return several strings - return Arrays.asList("GIS", "WPS " + getOgcServiceUri()); - } - - /** - * Return a list of data values uniquely identifying this service - * description (to avoid duplicates). Include only primary key like fields, - * ie. ignore descriptions, icons, etc. - */ - @Override - protected List<? extends Object> getIdentifyingData() { - // FIXME: Use your fields instead of example fields - return Arrays.<Object>asList(ogcServiceUri, processIdentifier); - } - - - // All fields are searchable in the Service palette, - // for instance try a search for exampleString:3 - private URI ogcServiceUri; - private String processIdentifier; - - public URI getOgcServiceUri() { - return ogcServiceUri; - } - public void setOgcServiceUri(URI ogcServiceUri) { - this.ogcServiceUri = ogcServiceUri; - } - public String getProcessIdentifier() { - return processIdentifier; - } - public void setProcessIdentifier(String processIdentifier) { - this.processIdentifier = processIdentifier; - } - -} http://git-wip-us.apache.org/repos/asf/incubator-taverna-plugin-gis/blob/06fe487d/apache-taverna-activity-gis-activity-ui/src/main/java/org/apache/taverna/gis/ui/serviceprovider/GisServiceIcon.java ---------------------------------------------------------------------- diff --git a/apache-taverna-activity-gis-activity-ui/src/main/java/org/apache/taverna/gis/ui/serviceprovider/GisServiceIcon.java b/apache-taverna-activity-gis-activity-ui/src/main/java/org/apache/taverna/gis/ui/serviceprovider/GisServiceIcon.java deleted file mode 100644 index f2f3c56..0000000 --- a/apache-taverna-activity-gis-activity-ui/src/main/java/org/apache/taverna/gis/ui/serviceprovider/GisServiceIcon.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -package org.apache.taverna.gis.ui.serviceprovider; - -import java.net.URI; - -import javax.swing.Icon; -import javax.swing.ImageIcon; - -import org.apache.taverna.workbench.activityicons.ActivityIconSPI; - -public class GisServiceIcon implements ActivityIconSPI { - - private static final URI ACTIVITY_TYPE = URI - .create("http://example.com/2013/activity/apache-taverna-activity-gis"); - - private static Icon icon; - - @Override - public int canProvideIconScore(URI activityType) { - if (ACTIVITY_TYPE.equals(activityType)) { - return DEFAULT_ICON + 1; - } - return NO_ICON; - } - - @Override - public Icon getIcon(URI activityType) { - return getIcon(); - } - - public static Icon getIcon() { - if (icon == null) { - icon = new ImageIcon(GisServiceIcon.class.getResource("/exampleIcon.png")); - } - return icon; - } - -} http://git-wip-us.apache.org/repos/asf/incubator-taverna-plugin-gis/blob/06fe487d/apache-taverna-activity-gis-activity-ui/src/main/java/org/apache/taverna/gis/ui/serviceprovider/GisServiceProvider.java ---------------------------------------------------------------------- diff --git a/apache-taverna-activity-gis-activity-ui/src/main/java/org/apache/taverna/gis/ui/serviceprovider/GisServiceProvider.java b/apache-taverna-activity-gis-activity-ui/src/main/java/org/apache/taverna/gis/ui/serviceprovider/GisServiceProvider.java deleted file mode 100644 index 9811100..0000000 --- a/apache-taverna-activity-gis-activity-ui/src/main/java/org/apache/taverna/gis/ui/serviceprovider/GisServiceProvider.java +++ /dev/null @@ -1,204 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -package org.apache.taverna.gis.ui.serviceprovider; - -import java.io.IOException; -import java.net.URI; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import javax.swing.Icon; - -import org.apache.taverna.scufl2.api.common.Visitor; -import org.apache.taverna.scufl2.api.common.WorkflowBean; -import org.apache.taverna.scufl2.api.configurations.Configuration; -import org.apache.taverna.servicedescriptions.AbstractConfigurableServiceProvider; -import org.apache.taverna.servicedescriptions.ConfigurableServiceProvider; -import org.apache.taverna.servicedescriptions.ServiceDescription; -import org.apache.taverna.servicedescriptions.ServiceDescriptionProvider; -import org.apache.taverna.servicedescriptions.ServiceDescriptionProvider.FindServiceDescriptionsCallBack; -import org.apache.taverna.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean; -import org.apache.taverna.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean; -import org.n52.wps.client.WPSClientSession; - -import com.fasterxml.jackson.databind.node.ObjectNode; - -import net.opengis.wps.x100.InputDescriptionType; -import net.opengis.wps.x100.OutputDescriptionType; -import net.opengis.wps.x100.ProcessDescriptionType; - -public class GisServiceProvider extends AbstractConfigurableServiceProvider - implements ConfigurableServiceProvider { - - - public GisServiceProvider() { - super(defaultConfig()); - - } - - private static Configuration defaultConfig() { - Configuration c = new Configuration(); - ObjectNode conf = c.getJsonAsObjectNode(); - conf.put("osgiServiceUri", "http://localhost:8080/geoserver/ows"); - conf.put("processIdentifier", "gs:StringConcatWPS"); - return c; - } - - private static final URI providerId = GisServiceDesc.ACTIVITY_TYPE.resolve("#provider"); - - /** - * Do the actual search for services. Return using the callBack parameter. - */ - @SuppressWarnings("unchecked") - public void findServiceDescriptionsAsync(FindServiceDescriptionsCallBack callBack) { - // Use callback.status() for long-running searches - callBack.status("Resolving GIS services"); - - List<ServiceDescription> results = new ArrayList<ServiceDescription>(); - - // FIXME: Implement the actual service search/lookup instead - // of dummy for-loop - - GisServiceDesc service = new GisServiceDesc(); - // Populate the service description bean - ObjectNode conf = getConfiguration().getJsonAsObjectNode(); - String serviceUri = conf.get("osgiServiceUri").asText(); - service.setOgcServiceUri(URI.create(serviceUri)); - String processIdentifier = conf.get("processIdentifier").asText(); - service.setProcessIdentifier(processIdentifier); - - // TODO: Optional: set description (Set a better description - service.setDescription(processIdentifier); - - // TODO: Exctract in a separate method - // Get input ports - - WPSClientSession wpsClient = WPSClientSession.getInstance(); - - ProcessDescriptionType processDescription; - try { - processDescription = wpsClient - .getProcessDescription(serviceUri, processIdentifier); - - InputDescriptionType[] inputList = processDescription.getDataInputs() - .getInputArray(); - - List<ActivityInputPortDefinitionBean> inputPortDefinitions = new ArrayList<ActivityInputPortDefinitionBean>(); - - for (InputDescriptionType input : inputList) { - ActivityInputPortDefinitionBean newInputPort = new ActivityInputPortDefinitionBean(); - newInputPort.setName(input.getIdentifier().getStringValue()); - newInputPort.setDepth(0); - newInputPort.setAllowsLiteralValues(true); - newInputPort.setHandledReferenceSchemes(null); - newInputPort.setTranslatedElementType(String.class); - - inputPortDefinitions.add(newInputPort); - - } - - // service.setInputPortDefinitions(inputPortDefinitions); - - - // Get output ports - - OutputDescriptionType[] outputList = processDescription.getProcessOutputs().getOutputArray(); - List<ActivityOutputPortDefinitionBean> outputPortDefinitions = new ArrayList<ActivityOutputPortDefinitionBean>(); - - for( OutputDescriptionType output : outputList ) - { - ActivityOutputPortDefinitionBean newOutputPort = new ActivityOutputPortDefinitionBean(); - newOutputPort.setName(output.getIdentifier().getStringValue()); - newOutputPort.setDepth(0); - - outputPortDefinitions.add(newOutputPort); - - } - - //service.setOutputPortDefinitions(outputPortDefinitions); - - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - results.add(service); - - // partialResults() can also be called several times from inside - // for-loop if the full search takes a long time - callBack.partialResults(results); - - // No more results will be coming - callBack.finished(); - } - - /** - * Icon for service provider - */ - public Icon getIcon() { - return GisServiceIcon.getIcon(); - } - - /** - * Name of service provider, appears in right click for 'Remove service - * provider' - */ - public String getName() { - return "Geospatial Web Services"; - } - - @Override - public String toString() { - return "Geospatial Web Services " + getConfiguration().getJson().get("osgiServiceUri"); - } - - public String getId() { - return providerId.toASCIIString(); - } - - @Override - protected List<? extends Object> getIdentifyingData() { - return Arrays.asList(getConfiguration().getJson().get("osgiServiceUri"), - getConfiguration().getJson().get("processIdentifier")); - } - - @Override - public ServiceDescriptionProvider newInstance() { - return new GisServiceProvider(); - } - - @Override - public URI getType() { - return providerId; - } - - @Override - public void setType(URI type) { - } - - @Override - public boolean accept(Visitor visitor) { - return false; - } - - -} http://git-wip-us.apache.org/repos/asf/incubator-taverna-plugin-gis/blob/06fe487d/apache-taverna-activity-gis-activity-ui/src/main/java/org/apache/taverna/gis/ui/view/GisActivityContextViewFactory.java ---------------------------------------------------------------------- diff --git a/apache-taverna-activity-gis-activity-ui/src/main/java/org/apache/taverna/gis/ui/view/GisActivityContextViewFactory.java b/apache-taverna-activity-gis-activity-ui/src/main/java/org/apache/taverna/gis/ui/view/GisActivityContextViewFactory.java deleted file mode 100644 index 958c626..0000000 --- a/apache-taverna-activity-gis-activity-ui/src/main/java/org/apache/taverna/gis/ui/view/GisActivityContextViewFactory.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -package org.apache.taverna.gis.ui.view; - -import java.net.URI; -import java.util.Arrays; -import java.util.List; - -import org.apache.taverna.services.ServiceRegistry; -import org.apache.taverna.scufl2.api.activity.Activity; - -import org.apache.taverna.servicedescriptions.ServiceDescriptionRegistry; -import org.apache.taverna.workbench.activityicons.ActivityIconManager; -import org.apache.taverna.workbench.edits.EditManager; -import org.apache.taverna.workbench.file.FileManager; -import org.apache.taverna.workbench.ui.views.contextualviews.ContextualView; -import org.apache.taverna.workbench.ui.views.contextualviews.activity.ContextualViewFactory; - -public class GisActivityContextViewFactory implements ContextualViewFactory<Activity> { - - private static final URI ACTIVITY_TYPE = URI - .create("http://example.com/2013/activity/apache-taverna-activity-gis"); - - private EditManager editManager; - private FileManager fileManager; - private ActivityIconManager activityIconManager; - private ServiceDescriptionRegistry serviceDescriptionRegistry; - private ServiceRegistry serviceRegistry; - - @Override - public boolean canHandle(Object object) { - return object instanceof Activity && ((Activity) object).getType().equals(ACTIVITY_TYPE); - } - - @Override - public List<ContextualView> getViews(Activity selection) { - return Arrays.<ContextualView>asList(new GisContextualView(selection, editManager, - fileManager, activityIconManager, serviceDescriptionRegistry, serviceRegistry)); - } - - public void setEditManager(EditManager editManager) { - this.editManager = editManager; - } - - public void setFileManager(FileManager fileManager) { - this.fileManager = fileManager; - } - - public void setActivityIconManager(ActivityIconManager activityIconManager) { - this.activityIconManager = activityIconManager; - } - - public void setServiceDescriptionRegistry(ServiceDescriptionRegistry serviceDescriptionRegistry) { - this.serviceDescriptionRegistry = serviceDescriptionRegistry; - } - - public void setServiceRegistry(ServiceRegistry serviceRegistry) { - this.serviceRegistry = serviceRegistry; - } - -} http://git-wip-us.apache.org/repos/asf/incubator-taverna-plugin-gis/blob/06fe487d/apache-taverna-activity-gis-activity-ui/src/main/java/org/apache/taverna/gis/ui/view/GisContextualView.java ---------------------------------------------------------------------- diff --git a/apache-taverna-activity-gis-activity-ui/src/main/java/org/apache/taverna/gis/ui/view/GisContextualView.java b/apache-taverna-activity-gis-activity-ui/src/main/java/org/apache/taverna/gis/ui/view/GisContextualView.java deleted file mode 100644 index d0d4274..0000000 --- a/apache-taverna-activity-gis-activity-ui/src/main/java/org/apache/taverna/gis/ui/view/GisContextualView.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -package org.apache.taverna.gis.ui.view; - -import java.awt.Frame; - -import javax.swing.Action; -import javax.swing.JComponent; -import javax.swing.JLabel; -import javax.swing.JPanel; - -import com.fasterxml.jackson.databind.JsonNode; - -import org.apache.taverna.services.ServiceRegistry; - -import org.apache.taverna.servicedescriptions.ServiceDescriptionRegistry; -import org.apache.taverna.workbench.activityicons.ActivityIconManager; -import org.apache.taverna.workbench.edits.EditManager; -import org.apache.taverna.workbench.file.FileManager; -import org.apache.taverna.workbench.ui.actions.activity.ActivityContextualView; - -import org.apache.taverna.scufl2.api.activity.Activity; - -import org.apache.taverna.gis.ui.config.GisConfigureAction; - -@SuppressWarnings("serial") -public class GisContextualView extends ActivityContextualView { - - private final EditManager editManager; - private final FileManager fileManager; - private final ActivityIconManager activityIconManager; - private final ServiceDescriptionRegistry serviceDescriptionRegistry; - private final ServiceRegistry serviceRegistry; - - private JLabel description = new JLabel("ads"); - - public GisContextualView(Activity activity, EditManager editManager, - FileManager fileManager, ActivityIconManager activityIconManager, - ServiceDescriptionRegistry serviceDescriptionRegistry, ServiceRegistry serviceRegistry) { - super(activity); - this.editManager = editManager; - this.fileManager = fileManager; - this.activityIconManager = activityIconManager; - this.serviceDescriptionRegistry = serviceDescriptionRegistry; - this.serviceRegistry = serviceRegistry; - initView(); - } - - @Override - public JComponent getMainFrame() { - JPanel jPanel = new JPanel(); - jPanel.add(description); - refreshView(); - return jPanel; - } - - @Override - public String getViewTitle() { - JsonNode configuration = getConfigBean().getJson(); - return "Gis service " + configuration.get("exampleString").asText(); - } - - /** - * Typically called when the activity configuration has changed. - */ - @Override - public void refreshView() { - JsonNode configuration = getConfigBean().getJson(); - description.setText("Gis service " + configuration.get("exampleUri").asText() - + " - " + configuration.get("exampleString").asText()); - // TODO: Might also show extra service information looked - // up dynamically from endpoint/registry - } - - /** - * View position hint - */ - @Override - public int getPreferredPosition() { - // We want to be on top - return 100; - } - - @Override - public Action getConfigureAction(final Frame owner) { - return new GisConfigureAction(getActivity(), editManager, fileManager, - activityIconManager, serviceDescriptionRegistry, serviceRegistry); - } - -} http://git-wip-us.apache.org/repos/asf/incubator-taverna-plugin-gis/blob/06fe487d/apache-taverna-activity-gis-activity-ui/src/main/resources/META-INF/spring/context-osgi.xml ---------------------------------------------------------------------- diff --git a/apache-taverna-activity-gis-activity-ui/src/main/resources/META-INF/spring/context-osgi.xml b/apache-taverna-activity-gis-activity-ui/src/main/resources/META-INF/spring/context-osgi.xml deleted file mode 100644 index c6bf32c..0000000 --- a/apache-taverna-activity-gis-activity-ui/src/main/resources/META-INF/spring/context-osgi.xml +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---> -<beans:beans xmlns="http://www.springframework.org/schema/osgi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:beans="http://www.springframework.org/schema/beans" - xsi:schemaLocation="http://www.springframework.org/schema/beans - http://www.springframework.org/schema/beans/spring-beans.xsd - http://www.springframework.org/schema/osgi - http://www.springframework.org/schema/osgi/spring-osgi.xsd"> - - <service ref="GisServiceIcon" interface="org.apache.taverna.workbench.activityicons.ActivityIconSPI" /> - - <service ref="GisServiceProvider" interface="org.apache.taverna.servicedescriptions.ServiceDescriptionProvider" /> - - <service ref="GisConfigureMenuAction" auto-export="interfaces" /> - - <service ref="GisActivityContextViewFactory" interface="org.apache.taverna.workbench.ui.views.contextualviews.activity.ContextualViewFactory" /> - - <reference id="editManager" interface="org.apache.taverna.workbench.edits.EditManager" /> - <reference id="fileManager" interface="org.apache.taverna.workbench.file.FileManager" /> - <reference id="menuManager" interface="org.apache.taverna.ui.menu.MenuManager" /> - <reference id="selectionManager" interface="org.apache.taverna.workbench.selection.SelectionManager" /> - <reference id="activityIconManager" interface="org.apache.taverna.workbench.activityicons.ActivityIconManager" /> - <reference id="colourManager" interface="org.apache.taverna.workbench.configuration.colour.ColourManager" /> - <reference id="serviceDescriptionRegistry" interface="org.apache.taverna.servicedescriptions.ServiceDescriptionRegistry" /> - <reference id="serviceRegistry" interface="org.apache.taverna.services.ServiceRegistry" /> - -</beans:beans> http://git-wip-us.apache.org/repos/asf/incubator-taverna-plugin-gis/blob/06fe487d/apache-taverna-activity-gis-activity-ui/src/main/resources/META-INF/spring/context.xml ---------------------------------------------------------------------- diff --git a/apache-taverna-activity-gis-activity-ui/src/main/resources/META-INF/spring/context.xml b/apache-taverna-activity-gis-activity-ui/src/main/resources/META-INF/spring/context.xml deleted file mode 100644 index 4b75d5f..0000000 --- a/apache-taverna-activity-gis-activity-ui/src/main/resources/META-INF/spring/context.xml +++ /dev/null @@ -1,49 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.springframework.org/schema/beans - http://www.springframework.org/schema/beans/spring-beans.xsd"> - - <bean id="GisServiceIcon" - class="org.apache.taverna.gis.ui.serviceprovider.GisServiceIcon" /> - - <bean id="GisServiceProvider" - class="org.apache.taverna.gis.ui.serviceprovider.GisServiceProvider" /> - - <bean id="GisConfigureMenuAction" - class="org.apache.taverna.gis.ui.menu.GisConfigureMenuAction"> - <property name="editManager" ref="editManager" /> - <property name="fileManager" ref="fileManager" /> - <property name="activityIconManager" ref="activityIconManager" /> - <property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" /> - <property name="serviceRegistry" ref="serviceRegistry" /> - </bean> - - <bean id="GisActivityContextViewFactory" - class="org.apache.taverna.gis.ui.view.GisActivityContextViewFactory"> - <property name="editManager" ref="editManager" /> - <property name="fileManager" ref="fileManager" /> - <property name="activityIconManager" ref="activityIconManager" /> - <property name="serviceDescriptionRegistry" ref="serviceDescriptionRegistry" /> - <property name="serviceRegistry" ref="serviceRegistry" /> - </bean> - -</beans> http://git-wip-us.apache.org/repos/asf/incubator-taverna-plugin-gis/blob/06fe487d/apache-taverna-activity-gis-activity-ui/src/main/resources/exampleIcon.png ---------------------------------------------------------------------- diff --git a/apache-taverna-activity-gis-activity-ui/src/main/resources/exampleIcon.png b/apache-taverna-activity-gis-activity-ui/src/main/resources/exampleIcon.png deleted file mode 100644 index 8bb31c3..0000000 Binary files a/apache-taverna-activity-gis-activity-ui/src/main/resources/exampleIcon.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-taverna-plugin-gis/blob/06fe487d/apache-taverna-activity-gis-activity/pom.xml ---------------------------------------------------------------------- diff --git a/apache-taverna-activity-gis-activity/pom.xml b/apache-taverna-activity-gis-activity/pom.xml deleted file mode 100644 index 62ba36c..0000000 --- a/apache-taverna-activity-gis-activity/pom.xml +++ /dev/null @@ -1,75 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.taverna.gis</groupId> - <artifactId>apache-taverna-plugin-gis</artifactId> - <version>0.0.1-incubating-SNAPSHOT</version> - </parent> - <artifactId>taverna-gis-activity</artifactId> - <packaging>bundle</packaging> - <name>Gis Taverna activity</name> - - <dependencies> - <dependency> - <groupId>org.apache.taverna.engine</groupId> - <artifactId>taverna-workflowmodel-api</artifactId> - <version>${taverna.engine.version}</version> - </dependency> - <dependency> - <groupId>org.apache.taverna.engine</groupId> - <artifactId>taverna-reference-api</artifactId> - <version>${taverna.engine.version}</version> - </dependency> - - <dependency> - <groupId>com.fasterxml.jackson.core</groupId> - <artifactId>jackson-databind</artifactId> - <version>2.3.0</version> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.4</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.apache.taverna.engine</groupId> - <artifactId>taverna-workflowmodel-impl</artifactId> - <version>${taverna.engine.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.apache.taverna.engine</groupId> - <artifactId>taverna-activity-test-utils</artifactId> - <version>${taverna.engine.version}</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>${project.parent.groupId}</groupId> - <artifactId>taverna-gis-client</artifactId> - <version>${project.parent.version}</version> - </dependency> - </dependencies> -</project> http://git-wip-us.apache.org/repos/asf/incubator-taverna-plugin-gis/blob/06fe487d/apache-taverna-activity-gis-activity/src/main/java/org/apache/taverna/gis/GisActivity.java ---------------------------------------------------------------------- diff --git a/apache-taverna-activity-gis-activity/src/main/java/org/apache/taverna/gis/GisActivity.java b/apache-taverna-activity-gis-activity/src/main/java/org/apache/taverna/gis/GisActivity.java deleted file mode 100644 index 2b8aef0..0000000 --- a/apache-taverna-activity-gis-activity/src/main/java/org/apache/taverna/gis/GisActivity.java +++ /dev/null @@ -1,177 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -package org.apache.taverna.gis; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import org.geotools.ows.ServiceException; -import org.n52.wps.client.ExecuteRequestBuilder; -import org.n52.wps.client.ExecuteResponseAnalyser; -import org.n52.wps.client.WPSClientException; -import org.n52.wps.client.WPSClientSession; -import org.n52.wps.io.data.IData; -import org.n52.wps.io.data.binding.complex.GTVectorDataBinding; - -import net.opengis.wps.x100.DataType; -import net.opengis.wps.x100.ExecuteDocument; -import net.opengis.wps.x100.ExecuteResponseDocument; -import net.opengis.wps.x100.OutputDataType; -import net.opengis.wps.x100.ProcessDescriptionType; -import org.apache.taverna.invocation.InvocationContext; -import org.apache.taverna.reference.ReferenceService; -import org.apache.taverna.reference.T2Reference; -import org.apache.taverna.workflowmodel.processor.activity.AbstractAsynchronousActivity; -import org.apache.taverna.workflowmodel.processor.activity.ActivityConfigurationException; -import org.apache.taverna.workflowmodel.processor.activity.AsynchronousActivity; -import org.apache.taverna.workflowmodel.processor.activity.AsynchronousActivityCallback; -import org.apache.taverna.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean; -import org.apache.taverna.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean; - -public class GisActivity extends AbstractAsynchronousActivity<GisActivityConfigurationBean> - implements AsynchronousActivity<GisActivityConfigurationBean> { - - private GisActivityConfigurationBean configBean; - - @Override - public void configure(GisActivityConfigurationBean configBean) throws ActivityConfigurationException { - - // TODO: Should I call HealthChecker here?? - // Any pre-config sanity checks - if (configBean.getOgcServiceUri().equals("")) { - throw new ActivityConfigurationException("Geospatial web service URI can't be empty"); - } - // Store for getConfiguration() - this.configBean = configBean; - - // REQUIRED: (Re)create input/output ports depending on configuration - configurePorts(); - } - - protected void configurePorts() { - // In case we are being reconfigured - remove existing ports first - // to avoid duplicates - removeInputs(); - removeOutputs(); - - // Add input ports - for(ActivityInputPortDefinitionBean inputPort : configBean.getInputPortDefinitions()) - { - addInput(inputPort.getName(),inputPort.getDepth(),inputPort.getAllowsLiteralValues(),inputPort.getHandledReferenceSchemes(), inputPort.getTranslatedElementType()); - } - - // Add output ports - for(ActivityOutputPortDefinitionBean outputPort : configBean.getOutputPortDefinitions()) - { - addOutput(outputPort.getName(),outputPort.getDepth()); - } - - } - - @SuppressWarnings("unchecked") - @Override - public void executeAsynch(final Map<String, T2Reference> inputs, final AsynchronousActivityCallback callback) { - // Execute service asynchronously - callback.requestRun(new Runnable() { - - public void run() { - InvocationContext context = callback.getContext(); - ReferenceService referenceService = context.getReferenceService(); - - // Declare outputs variable - Map<String, T2Reference> outputs = null; - - try { - - // prepare the execute object - WPSClientSession wpsClient = WPSClientSession.getInstance(); - - ProcessDescriptionType processDescription = wpsClient.getProcessDescription(configBean.getOgcServiceUri().toString(), configBean.getProcessIdentifier()); - - ExecuteRequestBuilder executeBuilder = new ExecuteRequestBuilder(processDescription); - - for (ActivityInputPortDefinitionBean activityInputPort : configBean.getInputPortDefinitions()) { - String portValue = (String) referenceService.renderIdentifier(inputs.get(activityInputPort.getName()), String.class, context); - executeBuilder.addLiteralData(activityInputPort.getName(), portValue); - } - - ExecuteDocument execute = executeBuilder.getExecute(); - - execute.getExecute().setService("WPS"); - - Object responseObject = null; - - try { - // execute service - responseObject = wpsClient.execute(configBean.getOgcServiceUri().toString(), execute); - } catch (WPSClientException e) { - // if the an error return from service - callback.fail(e.getServerException().xmlText()); - } - - // Register outputs - outputs = new HashMap<String, T2Reference>(); - T2Reference simpleRef = null; - - if (responseObject instanceof ExecuteResponseDocument) { - ExecuteResponseDocument response = (ExecuteResponseDocument) responseObject; - - // analyser is used to get complex data - ExecuteResponseAnalyser analyser = new ExecuteResponseAnalyser( - execute, response, processDescription); - - for(OutputDataType output : response.getExecuteResponse().getProcessOutputs().getOutputArray()) - { - DataType data = output.getData(); - - if (data.isSetLiteralData()) - { - simpleRef = referenceService.register(data.getLiteralData().getStringValue(), 0, true, context); - - outputs.put(output.getIdentifier().getStringValue(), simpleRef); - } - - } - - } - - - } catch (WPSClientException e) { - callback.fail(e.getMessage()); - } catch (IOException e) { - callback.fail(e.getMessage()); - } - - callback.receiveResult(outputs, new int[0]); - } - }); - } - - @Override - public GisActivityConfigurationBean getConfiguration() { - return this.configBean; - } - -} http://git-wip-us.apache.org/repos/asf/incubator-taverna-plugin-gis/blob/06fe487d/apache-taverna-activity-gis-activity/src/main/java/org/apache/taverna/gis/GisActivityConfigurationBean.java ---------------------------------------------------------------------- diff --git a/apache-taverna-activity-gis-activity/src/main/java/org/apache/taverna/gis/GisActivityConfigurationBean.java b/apache-taverna-activity-gis-activity/src/main/java/org/apache/taverna/gis/GisActivityConfigurationBean.java deleted file mode 100644 index babafae..0000000 --- a/apache-taverna-activity-gis-activity/src/main/java/org/apache/taverna/gis/GisActivityConfigurationBean.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -package org.apache.taverna.gis; - -import java.io.Serializable; -import java.net.URI; -import java.util.List; - -import net.opengis.wps.x100.InputDescriptionType; -import net.opengis.wps.x100.OutputDescriptionType; -import org.apache.taverna.workflowmodel.processor.activity.config.ActivityPortsDefinitionBean; - -/** - * Gis activity configuration bean. - * - */ -public class GisActivityConfigurationBean extends ActivityPortsDefinitionBean implements Serializable { - - /* - * TODO: Remove this comment. Should the jackson ojbect be managed in this class? - * - * The configuration specifies the variable options and configurations for - * an activity that has been added to a workflow. For instance for a WSDL - * activity, the configuration contains the URL for the WSDL together with - * the method name. String constant configurations contain the string that - * is to be returned, while Beanshell script configurations contain both the - * scripts and the input/output ports (by subclassing - * ActivityPortsDefinitionBean). - * - * Configuration beans are serialised as XML (currently by using XMLBeans) - * when Taverna is saving the workflow definitions. Therefore the - * configuration beans need to follow the JavaBeans style and only have - * fields of 'simple' types such as Strings, integers, etc. Other beans can - * be referenced as well, as long as they are part of the same plugin. - */ - - - private URI ogcServiceUri; - private String processIdentifier; - - public URI getOgcServiceUri() { - return ogcServiceUri; - } - public void setOgcServiceUri(URI ogcServiceUri) { - this.ogcServiceUri = ogcServiceUri; - } - public String getProcessIdentifier() { - return processIdentifier; - } - public void setProcessIdentifier(String processIdentifier) { - this.processIdentifier = processIdentifier; - } - -} http://git-wip-us.apache.org/repos/asf/incubator-taverna-plugin-gis/blob/06fe487d/apache-taverna-activity-gis-activity/src/main/java/org/apache/taverna/gis/GisActivityExample.java ---------------------------------------------------------------------- diff --git a/apache-taverna-activity-gis-activity/src/main/java/org/apache/taverna/gis/GisActivityExample.java b/apache-taverna-activity-gis-activity/src/main/java/org/apache/taverna/gis/GisActivityExample.java deleted file mode 100644 index 47f80f3..0000000 --- a/apache-taverna-activity-gis-activity/src/main/java/org/apache/taverna/gis/GisActivityExample.java +++ /dev/null @@ -1,152 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -package org.apache.taverna.gis; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.fasterxml.jackson.databind.JsonNode; - -import org.apache.taverna.invocation.InvocationContext; -import org.apache.taverna.reference.ReferenceService; -import org.apache.taverna.reference.T2Reference; -import org.apache.taverna.workflowmodel.processor.activity.AbstractAsynchronousActivity; -import org.apache.taverna.workflowmodel.processor.activity.ActivityConfigurationException; -import org.apache.taverna.workflowmodel.processor.activity.AsynchronousActivity; -import org.apache.taverna.workflowmodel.processor.activity.AsynchronousActivityCallback; - -/** - * Gis <code>Activity<code>. - */ -public class GisActivityExample extends AbstractAsynchronousActivity<JsonNode> - implements AsynchronousActivity<JsonNode> { - - public static final String ACTIVITY_TYPE = "http://example.com/2013/activity/apache-taverna-activity-gis"; - - /* - * Best practice: Keep port names as constants to avoid misspelling. This - * would not apply if port names are looked up dynamically from the service - * operation, like done for WSDL services. - */ - public static final String IN_FIRST_INPUT = "firstInput"; - public static final String IN_EXTRA_DATA = "extraData"; - public static final String OUT_MORE_OUTPUTS = "moreOutputs"; - public static final String OUT_SIMPLE_OUTPUT = "simpleOutput"; - public static final String OUT_REPORT = "report"; - - private JsonNode configuration; - - @Override - public void configure(JsonNode configuration) throws ActivityConfigurationException { - - // Any pre-config sanity checks - if (configuration.get("exampleString").asText().equals("invalidExample")) { - throw new ActivityConfigurationException( - "Example string can't be 'invalidExample'"); - } - // Store for getConfiguration(), but you could also make - // getConfiguration() return a new bean from other sources - this.configuration = configuration; - - // OPTIONAL: - // Do any server-side lookups and configuration, like resolving WSDLs - - // myClient = new MyClient(configuration.get("exampleUri").asText()); - // this.service = myClient.getService(configuration.get("exampleString").asText()); - - } - - @Override - public JsonNode getConfiguration() { - return configuration; - } - - @SuppressWarnings("unchecked") - @Override - public void executeAsynch(final Map<String, T2Reference> inputs, - final AsynchronousActivityCallback callback) { - // Don't execute service directly now, request to be run ask to be run - // from thread pool and return asynchronously - callback.requestRun(new Runnable() { - - public void run() { - InvocationContext context = callback - .getContext(); - ReferenceService referenceService = context - .getReferenceService(); - // Resolve inputs - String firstInput = (String) referenceService.renderIdentifier(inputs.get(IN_FIRST_INPUT), - String.class, context); - - // Support our configuration-dependendent input - boolean optionalPorts = configuration.get("exampleString").asText().equals("specialCase"); - - List<byte[]> special = null; - // We'll also allow IN_EXTRA_DATA to be optionally not provided - if (optionalPorts && inputs.containsKey(IN_EXTRA_DATA)) { - // Resolve as a list of byte[] - special = (List<byte[]>) referenceService.renderIdentifier( - inputs.get(IN_EXTRA_DATA), byte[].class, context); - } - - - // TODO: Do the actual service invocation -// try { -// results = this.service.invoke(firstInput, special) -// } catch (ServiceException ex) { -// callback.fail("Could not invoke Gis service " + configBean.getExampleUri(), -// ex); -// // Make sure we don't call callback.receiveResult later -// return; -// } - - // Register outputs - Map<String, T2Reference> outputs = new HashMap<>(); - String simpleValue = "simple"; - T2Reference simpleRef = referenceService.register(simpleValue, 0, true, context); - outputs.put(OUT_SIMPLE_OUTPUT, simpleRef); - - // For list outputs, only need to register the top level list - List<String> moreValues = new ArrayList<>(); - moreValues.add("Value 1"); - moreValues.add("Value 2"); - T2Reference moreRef = referenceService.register(moreValues, 1, true, context); - outputs.put(OUT_MORE_OUTPUTS, moreRef); - - if (optionalPorts) { - // Populate our optional output port - // NOTE: Need to return output values for all defined output ports - String report = "Everything OK"; - outputs.put(OUT_REPORT, referenceService.register(report, - 0, true, context)); - } - - // return map of output data, with empty index array as this is - // the only and final result (this index parameter is used if - // pipelining output) - callback.receiveResult(outputs, new int[0]); - } - }); - } - -} http://git-wip-us.apache.org/repos/asf/incubator-taverna-plugin-gis/blob/06fe487d/apache-taverna-activity-gis-activity/src/main/java/org/apache/taverna/gis/GisActivityFactory.java ---------------------------------------------------------------------- diff --git a/apache-taverna-activity-gis-activity/src/main/java/org/apache/taverna/gis/GisActivityFactory.java b/apache-taverna-activity-gis-activity/src/main/java/org/apache/taverna/gis/GisActivityFactory.java deleted file mode 100644 index 0f43ab0..0000000 --- a/apache-taverna-activity-gis-activity/src/main/java/org/apache/taverna/gis/GisActivityFactory.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -package org.apache.taverna.gis; - -import static org.apache.taverna.gis.GisActivity.*; - -import java.io.IOException; -import java.net.URI; -import java.util.HashSet; -import java.util.Set; - -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; - -import org.apache.taverna.workflowmodel.Edits; -import org.apache.taverna.workflowmodel.processor.activity.ActivityFactory; -import org.apache.taverna.workflowmodel.processor.activity.ActivityInputPort; -import org.apache.taverna.workflowmodel.processor.activity.ActivityOutputPort; - -/** - * Gis <code>ActivityFactory<code>. - */ -public class GisActivityFactory implements ActivityFactory { - - private Edits edits; - - @Override - public GisActivity createActivity() { - return new GisActivity(); - } - - @Override - public URI getActivityType() { - return URI.create(GisActivity.ACTIVITY_TYPE); - } - - @Override - public JsonNode getActivityConfigurationSchema() { - ObjectMapper objectMapper = new ObjectMapper(); - try { - return objectMapper.readTree(getClass().getResource("/schema.json")); - } catch (IOException e) { - return objectMapper.createObjectNode(); - } - } - - @Override - public Set<ActivityInputPort> getInputPorts(JsonNode configuration) { - Set<ActivityInputPort> inputPorts = new HashSet<>(); - - // FIXME: Replace with your input port definitions - - // Hard coded input port, expecting a single String - inputPorts.add(edits.createActivityInputPort(IN_FIRST_INPUT, 0, true, null, String.class)); - - // Optional ports depending on configuration - if (configuration.get("exampleString").asText().equals("specialCase")) { - // depth 1, ie. list of binary byte[] arrays - inputPorts.add(edits.createActivityInputPort(IN_EXTRA_DATA, 1, true, null, byte[].class)); - } - - return inputPorts; - } - - @Override - public Set<ActivityOutputPort> getOutputPorts(JsonNode configuration) { - Set<ActivityOutputPort> outputPorts = new HashSet<>(); - - // FIXME: Replace with your output port definitions - - // Optional ports depending on configuration - if (configuration.get("exampleString").asText().equals("specialCase")) { - outputPorts.add(edits.createActivityOutputPort(OUT_REPORT, 0, 0)); - } - - // Single value output port (depth 0) - outputPorts.add(edits.createActivityOutputPort(OUT_SIMPLE_OUTPUT, 0, 0)); - // Output port with list of values (depth 1) - outputPorts.add(edits.createActivityOutputPort(OUT_MORE_OUTPUTS, 1, 1)); - - return outputPorts; - } - - /** - * Sets the edits property. - * <p> - * This method is used by Spring. The property name must match the property specified - * in the Spring context file. - * - * @param edits the <code>Edits</code> used to create input/output ports - */ - public void setEdits(Edits edits) { - this.edits = edits; - } - -} http://git-wip-us.apache.org/repos/asf/incubator-taverna-plugin-gis/blob/06fe487d/apache-taverna-activity-gis-activity/src/main/java/org/apache/taverna/gis/GisActivityHealthChecker.java ---------------------------------------------------------------------- diff --git a/apache-taverna-activity-gis-activity/src/main/java/org/apache/taverna/gis/GisActivityHealthChecker.java b/apache-taverna-activity-gis-activity/src/main/java/org/apache/taverna/gis/GisActivityHealthChecker.java deleted file mode 100644 index b1e3093..0000000 --- a/apache-taverna-activity-gis-activity/src/main/java/org/apache/taverna/gis/GisActivityHealthChecker.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -package org.apache.taverna.gis; - -import java.net.URI; -import java.util.ArrayList; -import java.util.List; - -import com.fasterxml.jackson.databind.JsonNode; - -import org.apache.taverna.visit.VisitReport; -import org.apache.taverna.visit.VisitReport.Status; -import org.apache.taverna.workflowmodel.health.HealthCheck; -import org.apache.taverna.workflowmodel.health.HealthChecker; - -/** - * Gis <code>HealthChecker</code>. - */ -public class GisActivityHealthChecker implements - HealthChecker<GisActivity> { - - public boolean canVisit(Object o) { - // Return True if we can visit the object. We could do - // deeper (but not time consuming) checks here, for instance - // if the health checker only deals with GisActivity where - // a certain configuration option is enabled. - return o instanceof GisActivity; - } - - public boolean isTimeConsuming() { - // Return true if the health checker does a network lookup - // or similar time consuming checks, in which case - // it would only be performed when using File->Validate workflow - // or File->Run. - return false; - } - - public VisitReport visit(GisActivity activity, List<Object> ancestry) { - JsonNode config = activity.getConfiguration(); - - // We'll build a list of subreports - List<VisitReport> subReports = new ArrayList<>(); - - if (!URI.create(config.get("exampleUri").asText()).isAbsolute()) { - // Report Severe problems we know won't work - VisitReport report = new VisitReport(HealthCheck.getInstance(), - activity, "Example URI must be absolute", HealthCheck.INVALID_URL, - Status.SEVERE); - subReports.add(report); - } - - if (config.get("exampleString").asText().equals("")) { - // Warning on possible problems - subReports.add(new VisitReport(HealthCheck.getInstance(), activity, - "Example string empty", HealthCheck.NO_CONFIGURATION, - Status.WARNING)); - } - - // The default explanation here will be used if the subreports list is - // empty - return new VisitReport(HealthCheck.getInstance(), activity, - "Gis service OK", HealthCheck.NO_PROBLEM, subReports); - } - -} http://git-wip-us.apache.org/repos/asf/incubator-taverna-plugin-gis/blob/06fe487d/apache-taverna-activity-gis-activity/src/main/resources/schema.json ---------------------------------------------------------------------- diff --git a/apache-taverna-activity-gis-activity/src/main/resources/schema.json b/apache-taverna-activity-gis-activity/src/main/resources/schema.json deleted file mode 100644 index 1e396b3..0000000 --- a/apache-taverna-activity-gis-activity/src/main/resources/schema.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-03/schema#", - "id": "http://example.com/2013/activity/apache-taverna-activity-gis.schema.json", - "title": "Gis activity configuration", - "type": "object", - "properties": { - "@context": { - "description": "JSON-LD context for interpreting the configuration as RDF", - "required": true, - "enum": ["http://example.com/2013/activity/apache-taverna-activity-gis.context.json"] - }, - "exampleString": { - "title": "Example String", - "description": "An example string property", - "type": "string", - "required": true - }, - "exampleUri": { - "title": "Example URI", - "description": "An example uri property", - "type": "string", - "required": true - } - } -} http://git-wip-us.apache.org/repos/asf/incubator-taverna-plugin-gis/blob/06fe487d/apache-taverna-activity-gis-activity/src/main/resources/spring/context-osgi.xml ---------------------------------------------------------------------- diff --git a/apache-taverna-activity-gis-activity/src/main/resources/spring/context-osgi.xml b/apache-taverna-activity-gis-activity/src/main/resources/spring/context-osgi.xml deleted file mode 100644 index 98809c2..0000000 --- a/apache-taverna-activity-gis-activity/src/main/resources/spring/context-osgi.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---> -<beans:beans xmlns="http://www.springframework.org/schema/osgi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:beans="http://www.springframework.org/schema/beans" - xsi:schemaLocation="http://www.springframework.org/schema/beans - http://www.springframework.org/schema/beans/spring-beans.xsd - http://www.springframework.org/schema/osgi - http://www.springframework.org/schema/osgi/spring-osgi.xsd"> - - <!-- Services to be registered with the OSGi service register --> - <service ref="GisActivityHealthChecker" interface="org.apache.taverna.workflowmodel.health.HealthChecker" /> - - <service ref="GisActivityFactory" interface="org.apache.taverna.workflowmodel.processor.activity.ActivityFactory" /> - - <!-- References to services required from the OSGi service register --> - <reference id="edits" interface="org.apache.taverna.workflowmodel.Edits" /> - -</beans:beans> http://git-wip-us.apache.org/repos/asf/incubator-taverna-plugin-gis/blob/06fe487d/apache-taverna-activity-gis-activity/src/main/resources/spring/context.xml ---------------------------------------------------------------------- diff --git a/apache-taverna-activity-gis-activity/src/main/resources/spring/context.xml b/apache-taverna-activity-gis-activity/src/main/resources/spring/context.xml deleted file mode 100644 index c42932d..0000000 --- a/apache-taverna-activity-gis-activity/src/main/resources/spring/context.xml +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---> -<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.springframework.org/schema/beans - http://www.springframework.org/schema/beans/spring-beans.xsd"> - - <bean id="GisActivityHealthChecker" class="org.apache.taverna.gis.GisActivityHealthChecker" /> - - <bean id="GisActivityFactory" class="org.apache.taverna.gis.GisActivityFactory"> - <property name="edits" ref="edits" /> - </bean> - -</beans>
