You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oodt.apache.org by sm...@apache.org on 2010/06/11 22:38:59 UTC
svn commit: r953864 [4/5] - in /incubator/oodt/trunk:
resource/src/main/java/gov/nasa/jpl/oodt/cas/resource/batchmgr/
resource/src/main/java/gov/nasa/jpl/oodt/cas/resource/examples/
resource/src/main/java/gov/nasa/jpl/oodt/cas/resource/jobqueue/ resour...
Modified: incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/repository/XMLWorkflowRepository.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/repository/XMLWorkflowRepository.java?rev=953864&r1=953863&r2=953864&view=diff
==============================================================================
--- incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/repository/XMLWorkflowRepository.java (original)
+++ incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/repository/XMLWorkflowRepository.java Fri Jun 11 20:38:55 2010
@@ -1,581 +1,594 @@
-//Copyright (c) 2005, California Institute of Technology.
-//ALL RIGHTS RESERVED. U.S. Government sponsorship acknowledged.
-//
-//$Id$
-
-package gov.nasa.jpl.oodt.cas.workflow.repository;
-
-//OODT imports
-import gov.nasa.jpl.oodt.cas.workflow.util.XmlStructFactory;
-import gov.nasa.jpl.oodt.cas.workflow.structs.Workflow;
-import gov.nasa.jpl.oodt.cas.workflow.structs.WorkflowTask;
-import gov.nasa.jpl.oodt.cas.workflow.structs.WorkflowCondition;
-import gov.nasa.jpl.oodt.cas.workflow.structs.WorkflowTaskConfiguration;
-import gov.nasa.jpl.oodt.cas.workflow.structs.exceptions.RepositoryException;
-
-//JDK imports
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Vector;
-import java.util.Iterator;
-import java.util.Arrays;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.FileFilter;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import org.w3c.dom.Document;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.Element;
-import org.xml.sax.InputSource;
-
-/**
- * @author mattmann
- * @version $Revsion$
- *
- * <p>
- * A {@link WorkflowRepository} that loads events, {@link Workflow}s,
- * {@link WorkflowTask}s and {@link WorkflowCondition}s from specialized xml
- * files. The WorkflowRepository is given an initial set of seed directory uris,
- * where it looks for the following files:
- *
- * <ul>
- * <li>conditions.xml - defines workflow pre conditions</li>
- * <li>tasks.xml - defines workflow tasks</li>
- * <li>*.workflow.xml - individual workflow xml files specifying a single
- * workflow</li>
- * <li>events.xml - maps available workflows to event names</li>
- * </ul>
- *
- * All of the WorkflowTasks, WorkflowConditions and Workflows themselves are
- * cached in memory by their ids (which are typically URNs).
- * </p>
- */
-public class XMLWorkflowRepository implements WorkflowRepository {
-
- /* the list of directory URIs where workflow xml files live */
- private List workflowHomeUris = null;
-
- /* our log stream */
- private static Logger LOG = Logger.getLogger(XMLWorkflowRepository.class
- .getName());
-
- /* our task map */
- private static HashMap taskMap = new HashMap();
-
- /* our condition map */
- private static HashMap conditionMap = new HashMap();
-
- /* our workflow map */
- private static HashMap workflowMap = new HashMap();
-
- /* our event map */
- private static HashMap eventMap = new HashMap();
-
- private static FileFilter workflowXmlFilter = new FileFilter() {
- public boolean accept(File pathname) {
- return pathname.isFile()
- && pathname.toString().endsWith(".workflow.xml");
- }
- };
-
- /**
- * <p>
- * Constructs a new XMLWorkflowRepository with the given parameter
- * <code>uris</code>.
- * </p>
- *
- * @param uris
- * URIs pointing to directories that follow the XML workflow
- * repository convention documented at the top of this class.
- */
- public XMLWorkflowRepository(List uris) {
- workflowHomeUris = uris;
-
- // load the tasks and conditions
- loadConditions(workflowHomeUris);
- loadTasks(workflowHomeUris);
- loadWorkflows(workflowHomeUris);
- loadEvents(workflowHomeUris);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see gov.nasa.jpl.oodt.cas.workflow.repository.WorkflowRepository#getRegisteredEvents()
- */
- public List getRegisteredEvents() throws RepositoryException {
- return Arrays.asList(eventMap.keySet().toArray());
- }
-
- /*
- * (non-Javadoc)
- *
- * @see gov.nasa.jpl.oodt.cas.workflow.repository.WorkflowRepository#getWorkflowTaskById(java.lang.String)
- */
- public WorkflowTask getWorkflowTaskById(String taskId)
- throws RepositoryException {
- return (WorkflowTask) taskMap.get(taskId);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see gov.nasa.jpl.oodt.cas.workflow.repository.WorkflowRepository#getWorkflowConditionById(java.lang.String)
- */
- public WorkflowCondition getWorkflowConditionById(String conditionId)
- throws RepositoryException {
- return (WorkflowCondition) conditionMap.get(conditionId);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see gov.nasa.jpl.oodt.cas.workflow.repository.WorkflowRepository#getWorkflowByName(java.lang.String)
- */
- public Workflow getWorkflowByName(String workflowName)
- throws RepositoryException {
- for (Iterator i = workflowMap.keySet().iterator(); i.hasNext();) {
- String workflowId = (String) i.next();
- Workflow w = (Workflow) workflowMap.get(workflowId);
-
- if (w.getName().equals(workflowName)) {
- return w;
- }
- }
-
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see gov.nasa.jpl.oodt.cas.workflow.repository.WorkflowRepository#getWorkflowById(java.lang.String)
- */
- public Workflow getWorkflowById(String workflowId)
- throws RepositoryException {
- return (Workflow) workflowMap.get(workflowId);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see gov.nasa.jpl.oodt.cas.workflow.repository.WorkflowRepository#getWorkflows()
- */
- public List getWorkflows() throws RepositoryException {
- return Arrays.asList(workflowMap.values().toArray());
- }
-
- /*
- * (non-Javadoc)
- *
- * @see gov.nasa.jpl.oodt.cas.workflow.repository.WorkflowRepository#getTasksByWorkflowId(java.lang.String)
- */
- public List getTasksByWorkflowId(String workflowId)
- throws RepositoryException {
- Workflow w = getWorkflowById(workflowId);
- return w.getTasks();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see gov.nasa.jpl.oodt.cas.workflow.repository.WorkflowRepository#getTasksByWorkflowName(java.lang.String)
- */
- public List getTasksByWorkflowName(String workflowName)
- throws RepositoryException {
- Workflow w = getWorkflowByName(workflowName);
- return w.getTasks();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see gov.nasa.jpl.oodt.cas.workflow.repository.WorkflowRepository#getWorkflowsForEvent(java.lang.String)
- */
- public List getWorkflowsForEvent(String eventName)
- throws RepositoryException {
- return (List) eventMap.get(eventName);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see gov.nasa.jpl.oodt.cas.workflow.repository.WorkflowRepository#getConditionsByTaskName(java.lang.String)
- */
- public List getConditionsByTaskName(String taskName)
- throws RepositoryException {
- for (Iterator i = taskMap.values().iterator(); i.hasNext();) {
- WorkflowTask t = (WorkflowTask) i.next();
- if (t.getTaskName().equals(taskName)) {
- return t.getConditions();
- }
- }
-
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see gov.nasa.jpl.oodt.cas.workflow.repository.WorkflowRepository#getConditionsByTaskId(java.lang.String)
- */
- public List getConditionsByTaskId(String taskId) throws RepositoryException {
- WorkflowTask t = (WorkflowTask) taskMap.get(taskId);
- if (t != null) {
- return t.getConditions();
- } else
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see gov.nasa.jpl.oodt.cas.workflow.repository.WorkflowRepository#getConfigurationByTaskId(java.lang.String)
- */
- public WorkflowTaskConfiguration getConfigurationByTaskId(String taskId)
- throws RepositoryException {
- WorkflowTask task = (WorkflowTask) taskMap.get(taskId);
- return task.getTaskConfig();
- }
-
- /**
- * @param args
- */
- public static void main(String[] args) throws RepositoryException {
- String usage = "XmlWorkflowRepository <uri 1>...<uri n>\n";
- List uris = null;
-
- if (args.length == 0) {
- System.err.println(usage);
- System.exit(1);
- }
-
- uris = new Vector(args.length);
-
- for (int i = 0; i < args.length; i++) {
- if (args[i] != null) {
- uris.add(args[i]);
- }
- }
-
- XMLWorkflowRepository repo = new XMLWorkflowRepository(uris);
-
- List workflows = repo.getWorkflows();
-
- if (workflows != null) {
- for (Iterator i = workflows.iterator(); i.hasNext();) {
- Workflow w = (Workflow) i.next();
- System.out.println("Workflow: [id=" + w.getId() + ", name="
- + w.getName() + "]");
-
- System.out.println("Tasks: ");
-
- for (Iterator j = w.getTasks().iterator(); j.hasNext();) {
- WorkflowTask task = (WorkflowTask) j.next();
-
- System.out.println("Task: [class="
- + task.getTaskInstanceClassName() + ", id="
- + task.getTaskId() + ", name=" + task.getTaskName()
- + ", order=" + task.getOrder() + ",reqMetFields="
- + task.getRequiredMetFields() + "]");
- System.out.println("Configuration: ");
-
- for (Iterator k = task.getTaskConfig().getProperties()
- .keySet().iterator(); k.hasNext();) {
- String key = (String) k.next();
- String value = (String) task.getTaskConfig()
- .getProperties().get(key);
-
- System.out.println("[name=" + key + ", value=" + value
- + "]");
- }
-
- System.out.println("Conditions: ");
-
- for (Iterator k = task.getConditions().iterator(); k
- .hasNext();) {
- WorkflowCondition condition = (WorkflowCondition) k
- .next();
- System.out.println("Condition: ["
- + condition.getClass().getName() + ", id="
- + condition.getConditionId() + ", name="
- + condition.getConditionName() + ", order="
- + condition.getOrder() + "]");
- }
-
- }
-
- }
- } else {
- System.out.println("No workflows defined!");
- }
-
- }
-
- private void loadTasks(List dirUris) {
- if (dirUris != null && dirUris.size() > 0) {
- for (Iterator i = dirUris.iterator(); i.hasNext();) {
- String dirUri = (String) i.next();
-
- try {
- File workflowDir = new File(new URI(dirUri));
- if (workflowDir.isDirectory()) {
- String workflowDirStr = workflowDir.getAbsolutePath();
-
- if (!workflowDirStr.endsWith("/")) {
- workflowDirStr += "/";
- }
-
- Document taskRoot = getDocumentRoot(workflowDirStr
- + "tasks.xml");
-
- Element taskElement = taskRoot.getDocumentElement();
-
- NodeList taskElemList = taskElement
- .getElementsByTagName("task");
-
- if (taskElemList != null
- && taskElemList.getLength() > 0) {
- for (int j = 0; j < taskElemList.getLength(); j++) {
- Element taskElem = (Element) taskElemList
- .item(j);
- WorkflowTask task = XmlStructFactory
- .getWorkflowTask(taskElem, conditionMap);
- if (task != null) {
- taskMap.put(task.getTaskId(), task);
- }
- }
-
- }
- }
- } catch (URISyntaxException e) {
- LOG
- .log(
- Level.WARNING,
- "DirUri: "
- + dirUri
- + " is not a directory: skipping task loading for it.");
- }
-
- }
- }
- }
-
- private void loadConditions(List dirUris) {
- if (dirUris != null && dirUris.size() > 0) {
- for (Iterator i = dirUris.iterator(); i.hasNext();) {
- String dirUri = (String) i.next();
-
- try {
- File workflowDir = new File(new URI(dirUri));
- if (workflowDir.isDirectory()) {
- String workflowDirStr = workflowDir.getAbsolutePath();
-
- if (!workflowDirStr.endsWith("/")) {
- workflowDirStr += "/";
- }
-
- Document conditionRoot = getDocumentRoot(workflowDirStr
- + "conditions.xml");
-
- Element conditionElement = conditionRoot
- .getDocumentElement();
-
- NodeList conditionElemList = conditionElement
- .getElementsByTagName("condition");
-
- if (conditionElemList != null
- && conditionElemList.getLength() > 0) {
- for (int j = 0; j < conditionElemList.getLength(); j++) {
- Element conditionElem = (Element) conditionElemList
- .item(j);
- WorkflowCondition condition = XmlStructFactory
- .getWorkflowCondition(conditionElem);
- if (condition != null) {
- conditionMap.put(
- condition.getConditionId(),
- condition);
- }
- }
-
- }
- }
- } catch (URISyntaxException e) {
- LOG
- .log(
- Level.WARNING,
- "DirUri: "
- + dirUri
- + " is not a directory: skipping condition loading for it.");
- }
-
- }
- }
- }
-
- private void loadWorkflows(List dirUris) {
- if (dirUris != null && dirUris.size() > 0) {
- for (Iterator i = dirUris.iterator(); i.hasNext();) {
- String dirUri = (String) i.next();
-
- try {
- File workflowDir = new File(new URI(dirUri));
- if (workflowDir.isDirectory()) {
- String workflowDirStr = workflowDir.getAbsolutePath();
-
- if (!workflowDirStr.endsWith("/")) {
- workflowDirStr += "/";
- }
-
- // get all the workflow xml files
- File[] workflowFiles = workflowDir
- .listFiles(workflowXmlFilter);
-
- for (int j = 0; j < workflowFiles.length; j++) {
- String workflowXmlFile = workflowFiles[j]
- .getAbsolutePath();
- Document workflowRoot = getDocumentRoot(workflowXmlFile);
-
- String workflowId = workflowRoot
- .getDocumentElement().getAttribute("id");
- if (workflowMap.get(workflowId) == null) {
- Workflow w = XmlStructFactory.getWorkflow(
- workflowRoot.getDocumentElement(),
- taskMap);
- workflowMap.put(workflowId, w);
- } else {
- LOG
- .log(
- Level.FINE,
- "Ignoring workflow file: "
- + workflowXmlFile
- + " when loading workflows, workflow id: "
- + workflowId
- + " already loaded");
- }
-
- }
- }
- } catch (URISyntaxException e) {
- LOG
- .log(
- Level.WARNING,
- "DirUri: "
- + dirUri
- + " is not a directory: skipping workflow loading for it.");
- }
-
- }
- }
- }
-
- private void loadEvents(List dirUris) {
- if (dirUris != null && dirUris.size() > 0) {
- for (Iterator i = dirUris.iterator(); i.hasNext();) {
- String dirUri = (String) i.next();
-
- try {
- File workflowDir = new File(new URI(dirUri));
- if (workflowDir.isDirectory()) {
- String workflowDirStr = workflowDir.getAbsolutePath();
-
- if (!workflowDirStr.endsWith("/")) {
- workflowDirStr += "/";
- }
-
- Document eventRoot = getDocumentRoot(workflowDirStr
- + "events.xml");
-
- Element eventElement = eventRoot.getDocumentElement();
-
- NodeList eventElemList = eventElement
- .getElementsByTagName("event");
-
- if (eventElemList != null
- && eventElemList.getLength() > 0) {
- for (int j = 0; j < eventElemList.getLength(); j++) {
- Element eventElem = (Element) eventElemList
- .item(j);
-
- String eventName = eventElem
- .getAttribute("name");
- Workflow w = null;
-
- NodeList workflowNodeList = eventElem
- .getElementsByTagName("workflow");
-
- if (workflowNodeList != null
- && workflowNodeList.getLength() > 0) {
- List workflowList = new Vector();
-
- for (int k = 0; k < workflowNodeList
- .getLength(); k++) {
- Element workflowElement = (Element) workflowNodeList
- .item(k);
- w = (Workflow) workflowMap
- .get(workflowElement
- .getAttribute("id"));
-
- if (w != null) {
- workflowList.add(w);
- }
- }
-
- eventMap.put(eventName, workflowList);
- }
- }
- }
- }
- } catch (URISyntaxException e) {
- LOG
- .log(
- Level.WARNING,
- "DirUri: "
- + dirUri
- + " is not a directory: skipping event loading for it.");
- }
-
- }
- }
- }
-
- private Document getDocumentRoot(String xmlFile) {
- // open up the XML file
- DocumentBuilderFactory factory = null;
- DocumentBuilder parser = null;
- Document document = null;
- InputSource inputSource = null;
-
- InputStream xmlInputStream = null;
-
- try {
- xmlInputStream = new File(xmlFile).toURL().openStream();
- } catch (IOException e) {
- LOG.log(Level.WARNING,
- "IOException when getting input stream from [" + xmlFile
- + "]: returning null document root");
- return null;
- }
-
- inputSource = new InputSource(xmlInputStream);
-
- try {
- factory = DocumentBuilderFactory.newInstance();
- parser = factory.newDocumentBuilder();
- document = parser.parse(inputSource);
- } catch (Exception e) {
- LOG.warning("Unable to parse xml file [" + xmlFile + "]."
- + "Reason is [" + e + "]");
- return null;
- }
-
- return document;
- }
-
-}
+/*
+ * 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 gov.nasa.jpl.oodt.cas.workflow.repository;
+
+//OODT imports
+import gov.nasa.jpl.oodt.cas.workflow.util.XmlStructFactory;
+import gov.nasa.jpl.oodt.cas.workflow.structs.Workflow;
+import gov.nasa.jpl.oodt.cas.workflow.structs.WorkflowTask;
+import gov.nasa.jpl.oodt.cas.workflow.structs.WorkflowCondition;
+import gov.nasa.jpl.oodt.cas.workflow.structs.WorkflowTaskConfiguration;
+import gov.nasa.jpl.oodt.cas.workflow.structs.exceptions.RepositoryException;
+
+//JDK imports
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Vector;
+import java.util.Iterator;
+import java.util.Arrays;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.FileFilter;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import org.w3c.dom.Document;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.Element;
+import org.xml.sax.InputSource;
+
+/**
+ * @author mattmann
+ * @version $Revsion$
+ *
+ * <p>
+ * A {@link WorkflowRepository} that loads events, {@link Workflow}s,
+ * {@link WorkflowTask}s and {@link WorkflowCondition}s from specialized xml
+ * files. The WorkflowRepository is given an initial set of seed directory uris,
+ * where it looks for the following files:
+ *
+ * <ul>
+ * <li>conditions.xml - defines workflow pre conditions</li>
+ * <li>tasks.xml - defines workflow tasks</li>
+ * <li>*.workflow.xml - individual workflow xml files specifying a single
+ * workflow</li>
+ * <li>events.xml - maps available workflows to event names</li>
+ * </ul>
+ *
+ * All of the WorkflowTasks, WorkflowConditions and Workflows themselves are
+ * cached in memory by their ids (which are typically URNs).
+ * </p>
+ */
+public class XMLWorkflowRepository implements WorkflowRepository {
+
+ /* the list of directory URIs where workflow xml files live */
+ private List workflowHomeUris = null;
+
+ /* our log stream */
+ private static Logger LOG = Logger.getLogger(XMLWorkflowRepository.class
+ .getName());
+
+ /* our task map */
+ private static HashMap taskMap = new HashMap();
+
+ /* our condition map */
+ private static HashMap conditionMap = new HashMap();
+
+ /* our workflow map */
+ private static HashMap workflowMap = new HashMap();
+
+ /* our event map */
+ private static HashMap eventMap = new HashMap();
+
+ private static FileFilter workflowXmlFilter = new FileFilter() {
+ public boolean accept(File pathname) {
+ return pathname.isFile()
+ && pathname.toString().endsWith(".workflow.xml");
+ }
+ };
+
+ /**
+ * <p>
+ * Constructs a new XMLWorkflowRepository with the given parameter
+ * <code>uris</code>.
+ * </p>
+ *
+ * @param uris
+ * URIs pointing to directories that follow the XML workflow
+ * repository convention documented at the top of this class.
+ */
+ public XMLWorkflowRepository(List uris) {
+ workflowHomeUris = uris;
+
+ // load the tasks and conditions
+ loadConditions(workflowHomeUris);
+ loadTasks(workflowHomeUris);
+ loadWorkflows(workflowHomeUris);
+ loadEvents(workflowHomeUris);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see gov.nasa.jpl.oodt.cas.workflow.repository.WorkflowRepository#getRegisteredEvents()
+ */
+ public List getRegisteredEvents() throws RepositoryException {
+ return Arrays.asList(eventMap.keySet().toArray());
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see gov.nasa.jpl.oodt.cas.workflow.repository.WorkflowRepository#getWorkflowTaskById(java.lang.String)
+ */
+ public WorkflowTask getWorkflowTaskById(String taskId)
+ throws RepositoryException {
+ return (WorkflowTask) taskMap.get(taskId);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see gov.nasa.jpl.oodt.cas.workflow.repository.WorkflowRepository#getWorkflowConditionById(java.lang.String)
+ */
+ public WorkflowCondition getWorkflowConditionById(String conditionId)
+ throws RepositoryException {
+ return (WorkflowCondition) conditionMap.get(conditionId);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see gov.nasa.jpl.oodt.cas.workflow.repository.WorkflowRepository#getWorkflowByName(java.lang.String)
+ */
+ public Workflow getWorkflowByName(String workflowName)
+ throws RepositoryException {
+ for (Iterator i = workflowMap.keySet().iterator(); i.hasNext();) {
+ String workflowId = (String) i.next();
+ Workflow w = (Workflow) workflowMap.get(workflowId);
+
+ if (w.getName().equals(workflowName)) {
+ return w;
+ }
+ }
+
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see gov.nasa.jpl.oodt.cas.workflow.repository.WorkflowRepository#getWorkflowById(java.lang.String)
+ */
+ public Workflow getWorkflowById(String workflowId)
+ throws RepositoryException {
+ return (Workflow) workflowMap.get(workflowId);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see gov.nasa.jpl.oodt.cas.workflow.repository.WorkflowRepository#getWorkflows()
+ */
+ public List getWorkflows() throws RepositoryException {
+ return Arrays.asList(workflowMap.values().toArray());
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see gov.nasa.jpl.oodt.cas.workflow.repository.WorkflowRepository#getTasksByWorkflowId(java.lang.String)
+ */
+ public List getTasksByWorkflowId(String workflowId)
+ throws RepositoryException {
+ Workflow w = getWorkflowById(workflowId);
+ return w.getTasks();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see gov.nasa.jpl.oodt.cas.workflow.repository.WorkflowRepository#getTasksByWorkflowName(java.lang.String)
+ */
+ public List getTasksByWorkflowName(String workflowName)
+ throws RepositoryException {
+ Workflow w = getWorkflowByName(workflowName);
+ return w.getTasks();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see gov.nasa.jpl.oodt.cas.workflow.repository.WorkflowRepository#getWorkflowsForEvent(java.lang.String)
+ */
+ public List getWorkflowsForEvent(String eventName)
+ throws RepositoryException {
+ return (List) eventMap.get(eventName);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see gov.nasa.jpl.oodt.cas.workflow.repository.WorkflowRepository#getConditionsByTaskName(java.lang.String)
+ */
+ public List getConditionsByTaskName(String taskName)
+ throws RepositoryException {
+ for (Iterator i = taskMap.values().iterator(); i.hasNext();) {
+ WorkflowTask t = (WorkflowTask) i.next();
+ if (t.getTaskName().equals(taskName)) {
+ return t.getConditions();
+ }
+ }
+
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see gov.nasa.jpl.oodt.cas.workflow.repository.WorkflowRepository#getConditionsByTaskId(java.lang.String)
+ */
+ public List getConditionsByTaskId(String taskId) throws RepositoryException {
+ WorkflowTask t = (WorkflowTask) taskMap.get(taskId);
+ if (t != null) {
+ return t.getConditions();
+ } else
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see gov.nasa.jpl.oodt.cas.workflow.repository.WorkflowRepository#getConfigurationByTaskId(java.lang.String)
+ */
+ public WorkflowTaskConfiguration getConfigurationByTaskId(String taskId)
+ throws RepositoryException {
+ WorkflowTask task = (WorkflowTask) taskMap.get(taskId);
+ return task.getTaskConfig();
+ }
+
+ /**
+ * @param args
+ */
+ public static void main(String[] args) throws RepositoryException {
+ String usage = "XmlWorkflowRepository <uri 1>...<uri n>\n";
+ List uris = null;
+
+ if (args.length == 0) {
+ System.err.println(usage);
+ System.exit(1);
+ }
+
+ uris = new Vector(args.length);
+
+ for (int i = 0; i < args.length; i++) {
+ if (args[i] != null) {
+ uris.add(args[i]);
+ }
+ }
+
+ XMLWorkflowRepository repo = new XMLWorkflowRepository(uris);
+
+ List workflows = repo.getWorkflows();
+
+ if (workflows != null) {
+ for (Iterator i = workflows.iterator(); i.hasNext();) {
+ Workflow w = (Workflow) i.next();
+ System.out.println("Workflow: [id=" + w.getId() + ", name="
+ + w.getName() + "]");
+
+ System.out.println("Tasks: ");
+
+ for (Iterator j = w.getTasks().iterator(); j.hasNext();) {
+ WorkflowTask task = (WorkflowTask) j.next();
+
+ System.out.println("Task: [class="
+ + task.getTaskInstanceClassName() + ", id="
+ + task.getTaskId() + ", name=" + task.getTaskName()
+ + ", order=" + task.getOrder() + ",reqMetFields="
+ + task.getRequiredMetFields() + "]");
+ System.out.println("Configuration: ");
+
+ for (Iterator k = task.getTaskConfig().getProperties()
+ .keySet().iterator(); k.hasNext();) {
+ String key = (String) k.next();
+ String value = (String) task.getTaskConfig()
+ .getProperties().get(key);
+
+ System.out.println("[name=" + key + ", value=" + value
+ + "]");
+ }
+
+ System.out.println("Conditions: ");
+
+ for (Iterator k = task.getConditions().iterator(); k
+ .hasNext();) {
+ WorkflowCondition condition = (WorkflowCondition) k
+ .next();
+ System.out.println("Condition: ["
+ + condition.getClass().getName() + ", id="
+ + condition.getConditionId() + ", name="
+ + condition.getConditionName() + ", order="
+ + condition.getOrder() + "]");
+ }
+
+ }
+
+ }
+ } else {
+ System.out.println("No workflows defined!");
+ }
+
+ }
+
+ private void loadTasks(List dirUris) {
+ if (dirUris != null && dirUris.size() > 0) {
+ for (Iterator i = dirUris.iterator(); i.hasNext();) {
+ String dirUri = (String) i.next();
+
+ try {
+ File workflowDir = new File(new URI(dirUri));
+ if (workflowDir.isDirectory()) {
+ String workflowDirStr = workflowDir.getAbsolutePath();
+
+ if (!workflowDirStr.endsWith("/")) {
+ workflowDirStr += "/";
+ }
+
+ Document taskRoot = getDocumentRoot(workflowDirStr
+ + "tasks.xml");
+
+ Element taskElement = taskRoot.getDocumentElement();
+
+ NodeList taskElemList = taskElement
+ .getElementsByTagName("task");
+
+ if (taskElemList != null
+ && taskElemList.getLength() > 0) {
+ for (int j = 0; j < taskElemList.getLength(); j++) {
+ Element taskElem = (Element) taskElemList
+ .item(j);
+ WorkflowTask task = XmlStructFactory
+ .getWorkflowTask(taskElem, conditionMap);
+ if (task != null) {
+ taskMap.put(task.getTaskId(), task);
+ }
+ }
+
+ }
+ }
+ } catch (URISyntaxException e) {
+ LOG
+ .log(
+ Level.WARNING,
+ "DirUri: "
+ + dirUri
+ + " is not a directory: skipping task loading for it.");
+ }
+
+ }
+ }
+ }
+
+ private void loadConditions(List dirUris) {
+ if (dirUris != null && dirUris.size() > 0) {
+ for (Iterator i = dirUris.iterator(); i.hasNext();) {
+ String dirUri = (String) i.next();
+
+ try {
+ File workflowDir = new File(new URI(dirUri));
+ if (workflowDir.isDirectory()) {
+ String workflowDirStr = workflowDir.getAbsolutePath();
+
+ if (!workflowDirStr.endsWith("/")) {
+ workflowDirStr += "/";
+ }
+
+ Document conditionRoot = getDocumentRoot(workflowDirStr
+ + "conditions.xml");
+
+ Element conditionElement = conditionRoot
+ .getDocumentElement();
+
+ NodeList conditionElemList = conditionElement
+ .getElementsByTagName("condition");
+
+ if (conditionElemList != null
+ && conditionElemList.getLength() > 0) {
+ for (int j = 0; j < conditionElemList.getLength(); j++) {
+ Element conditionElem = (Element) conditionElemList
+ .item(j);
+ WorkflowCondition condition = XmlStructFactory
+ .getWorkflowCondition(conditionElem);
+ if (condition != null) {
+ conditionMap.put(
+ condition.getConditionId(),
+ condition);
+ }
+ }
+
+ }
+ }
+ } catch (URISyntaxException e) {
+ LOG
+ .log(
+ Level.WARNING,
+ "DirUri: "
+ + dirUri
+ + " is not a directory: skipping condition loading for it.");
+ }
+
+ }
+ }
+ }
+
+ private void loadWorkflows(List dirUris) {
+ if (dirUris != null && dirUris.size() > 0) {
+ for (Iterator i = dirUris.iterator(); i.hasNext();) {
+ String dirUri = (String) i.next();
+
+ try {
+ File workflowDir = new File(new URI(dirUri));
+ if (workflowDir.isDirectory()) {
+ String workflowDirStr = workflowDir.getAbsolutePath();
+
+ if (!workflowDirStr.endsWith("/")) {
+ workflowDirStr += "/";
+ }
+
+ // get all the workflow xml files
+ File[] workflowFiles = workflowDir
+ .listFiles(workflowXmlFilter);
+
+ for (int j = 0; j < workflowFiles.length; j++) {
+ String workflowXmlFile = workflowFiles[j]
+ .getAbsolutePath();
+ Document workflowRoot = getDocumentRoot(workflowXmlFile);
+
+ String workflowId = workflowRoot
+ .getDocumentElement().getAttribute("id");
+ if (workflowMap.get(workflowId) == null) {
+ Workflow w = XmlStructFactory.getWorkflow(
+ workflowRoot.getDocumentElement(),
+ taskMap);
+ workflowMap.put(workflowId, w);
+ } else {
+ LOG
+ .log(
+ Level.FINE,
+ "Ignoring workflow file: "
+ + workflowXmlFile
+ + " when loading workflows, workflow id: "
+ + workflowId
+ + " already loaded");
+ }
+
+ }
+ }
+ } catch (URISyntaxException e) {
+ LOG
+ .log(
+ Level.WARNING,
+ "DirUri: "
+ + dirUri
+ + " is not a directory: skipping workflow loading for it.");
+ }
+
+ }
+ }
+ }
+
+ private void loadEvents(List dirUris) {
+ if (dirUris != null && dirUris.size() > 0) {
+ for (Iterator i = dirUris.iterator(); i.hasNext();) {
+ String dirUri = (String) i.next();
+
+ try {
+ File workflowDir = new File(new URI(dirUri));
+ if (workflowDir.isDirectory()) {
+ String workflowDirStr = workflowDir.getAbsolutePath();
+
+ if (!workflowDirStr.endsWith("/")) {
+ workflowDirStr += "/";
+ }
+
+ Document eventRoot = getDocumentRoot(workflowDirStr
+ + "events.xml");
+
+ Element eventElement = eventRoot.getDocumentElement();
+
+ NodeList eventElemList = eventElement
+ .getElementsByTagName("event");
+
+ if (eventElemList != null
+ && eventElemList.getLength() > 0) {
+ for (int j = 0; j < eventElemList.getLength(); j++) {
+ Element eventElem = (Element) eventElemList
+ .item(j);
+
+ String eventName = eventElem
+ .getAttribute("name");
+ Workflow w = null;
+
+ NodeList workflowNodeList = eventElem
+ .getElementsByTagName("workflow");
+
+ if (workflowNodeList != null
+ && workflowNodeList.getLength() > 0) {
+ List workflowList = new Vector();
+
+ for (int k = 0; k < workflowNodeList
+ .getLength(); k++) {
+ Element workflowElement = (Element) workflowNodeList
+ .item(k);
+ w = (Workflow) workflowMap
+ .get(workflowElement
+ .getAttribute("id"));
+
+ if (w != null) {
+ workflowList.add(w);
+ }
+ }
+
+ eventMap.put(eventName, workflowList);
+ }
+ }
+ }
+ }
+ } catch (URISyntaxException e) {
+ LOG
+ .log(
+ Level.WARNING,
+ "DirUri: "
+ + dirUri
+ + " is not a directory: skipping event loading for it.");
+ }
+
+ }
+ }
+ }
+
+ private Document getDocumentRoot(String xmlFile) {
+ // open up the XML file
+ DocumentBuilderFactory factory = null;
+ DocumentBuilder parser = null;
+ Document document = null;
+ InputSource inputSource = null;
+
+ InputStream xmlInputStream = null;
+
+ try {
+ xmlInputStream = new File(xmlFile).toURL().openStream();
+ } catch (IOException e) {
+ LOG.log(Level.WARNING,
+ "IOException when getting input stream from [" + xmlFile
+ + "]: returning null document root");
+ return null;
+ }
+
+ inputSource = new InputSource(xmlInputStream);
+
+ try {
+ factory = DocumentBuilderFactory.newInstance();
+ parser = factory.newDocumentBuilder();
+ document = parser.parse(inputSource);
+ } catch (Exception e) {
+ LOG.warning("Unable to parse xml file [" + xmlFile + "]."
+ + "Reason is [" + e + "]");
+ return null;
+ }
+
+ return document;
+ }
+
+}
Modified: incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/repository/XMLWorkflowRepositoryFactory.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/repository/XMLWorkflowRepositoryFactory.java?rev=953864&r1=953863&r2=953864&view=diff
==============================================================================
--- incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/repository/XMLWorkflowRepositoryFactory.java (original)
+++ incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/repository/XMLWorkflowRepositoryFactory.java Fri Jun 11 20:38:55 2010
@@ -1,58 +1,71 @@
-//Copyright (c) 2006, California Institute of Technology.
-//ALL RIGHTS RESERVED. U.S. Government sponsorship acknowledged.
-//
-//$Id$
-
-package gov.nasa.jpl.oodt.cas.workflow.repository;
-
-//JDK imports
-import gov.nasa.jpl.oodt.cas.metadata.util.PathUtils;
-
-import java.util.List;
-import java.util.Arrays;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * @author mattmann
- * @version $Revsion$
- *
- * <p>A Factory class for creating {@link XMLWorkflowRepository}s.</p>
- */
-public class XMLWorkflowRepositoryFactory implements WorkflowRepositoryFactory {
-
- /* list of dir uris specifying file paths to workflow directories */
- private List workflowDirList = null;
-
- /* our log stream */
- private static Logger LOG = Logger.getLogger(XMLWorkflowRepositoryFactory.class.getName());
-
- /**
- * <p>Default Constructor</p>.
- */
- public XMLWorkflowRepositoryFactory() {
- String workflowDirUris = System.getProperty("gov.nasa.jpl.oodt.cas.workflow.repo.dirs");
-
- if(workflowDirUris != null){
- /* do env var replacement */
- workflowDirUris = PathUtils.replaceEnvVariables(workflowDirUris);
- String [] dirUris = workflowDirUris.split(",");
- workflowDirList = Arrays.asList(dirUris);
- }
-
- }
-
- /* (non-Javadoc)
- * @see gov.nasa.jpl.oodt.cas.workflow.repository.WorkflowRepositoryFactory#createRepository()
- */
- public WorkflowRepository createRepository() {
- if(workflowDirList != null){
- return new XMLWorkflowRepository(workflowDirList);
- }
- else{
- LOG.log(Level.WARNING, "Cannot create XML Workflow Repository: no workflow dir uris specified: value: "+System.getProperty("gov.nasa.jpl.oodt.cas.workflow.repo.dirs"));
- return null;
- }
- }
-
-}
+/*
+ * 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 gov.nasa.jpl.oodt.cas.workflow.repository;
+
+//JDK imports
+import gov.nasa.jpl.oodt.cas.metadata.util.PathUtils;
+
+import java.util.List;
+import java.util.Arrays;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * @author mattmann
+ * @version $Revsion$
+ *
+ * <p>A Factory class for creating {@link XMLWorkflowRepository}s.</p>
+ */
+public class XMLWorkflowRepositoryFactory implements WorkflowRepositoryFactory {
+
+ /* list of dir uris specifying file paths to workflow directories */
+ private List workflowDirList = null;
+
+ /* our log stream */
+ private static Logger LOG = Logger.getLogger(XMLWorkflowRepositoryFactory.class.getName());
+
+ /**
+ * <p>Default Constructor</p>.
+ */
+ public XMLWorkflowRepositoryFactory() {
+ String workflowDirUris = System.getProperty("gov.nasa.jpl.oodt.cas.workflow.repo.dirs");
+
+ if(workflowDirUris != null){
+ /* do env var replacement */
+ workflowDirUris = PathUtils.replaceEnvVariables(workflowDirUris);
+ String [] dirUris = workflowDirUris.split(",");
+ workflowDirList = Arrays.asList(dirUris);
+ }
+
+ }
+
+ /* (non-Javadoc)
+ * @see gov.nasa.jpl.oodt.cas.workflow.repository.WorkflowRepositoryFactory#createRepository()
+ */
+ public WorkflowRepository createRepository() {
+ if(workflowDirList != null){
+ return new XMLWorkflowRepository(workflowDirList);
+ }
+ else{
+ LOG.log(Level.WARNING, "Cannot create XML Workflow Repository: no workflow dir uris specified: value: "+System.getProperty("gov.nasa.jpl.oodt.cas.workflow.repo.dirs"));
+ return null;
+ }
+ }
+
+}
Modified: incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/TaskJob.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/TaskJob.java?rev=953864&r1=953863&r2=953864&view=diff
==============================================================================
--- incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/TaskJob.java (original)
+++ incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/TaskJob.java Fri Jun 11 20:38:55 2010
@@ -1,7 +1,20 @@
-//Copyright (c) 2006, California Institute of Technology.
-//ALL RIGHTS RESERVED. U.S. Government sponsorship acknowledged.
-//
-//$Id$
+/*
+ * 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 gov.nasa.jpl.oodt.cas.workflow.structs;
Modified: incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/TaskJobInput.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/TaskJobInput.java?rev=953864&r1=953863&r2=953864&view=diff
==============================================================================
--- incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/TaskJobInput.java (original)
+++ incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/TaskJobInput.java Fri Jun 11 20:38:55 2010
@@ -1,7 +1,20 @@
-//Copyright (c) 2006, California Institute of Technology.
-//ALL RIGHTS RESERVED. U.S. Government sponsorship acknowledged.
-//
-//$Id$
+/*
+ * 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 gov.nasa.jpl.oodt.cas.workflow.structs;
Modified: incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/Workflow.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/Workflow.java?rev=953864&r1=953863&r2=953864&view=diff
==============================================================================
--- incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/Workflow.java (original)
+++ incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/Workflow.java Fri Jun 11 20:38:55 2010
@@ -1,7 +1,20 @@
-//Copyright (c) 2005, California Institute of Technology.
-//ALL RIGHTS RESERVED. U.S. Government sponsorship acknowledged.
-//
-//$Id$
+/*
+ * 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 gov.nasa.jpl.oodt.cas.workflow.structs;
Modified: incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/WorkflowCondition.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/WorkflowCondition.java?rev=953864&r1=953863&r2=953864&view=diff
==============================================================================
--- incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/WorkflowCondition.java (original)
+++ incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/WorkflowCondition.java Fri Jun 11 20:38:55 2010
@@ -1,7 +1,20 @@
-//Copyright (c) 2005, California Institute of Technology.
-//ALL RIGHTS RESERVED. U.S. Government sponsorship acknowledged.
-//
-//$Id$
+/*
+ * 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 gov.nasa.jpl.oodt.cas.workflow.structs;
Modified: incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/WorkflowConditionConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/WorkflowConditionConfiguration.java?rev=953864&r1=953863&r2=953864&view=diff
==============================================================================
--- incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/WorkflowConditionConfiguration.java (original)
+++ incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/WorkflowConditionConfiguration.java Fri Jun 11 20:38:55 2010
@@ -1,3 +1,20 @@
+/*
+ * 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 gov.nasa.jpl.oodt.cas.workflow.structs;
import java.util.Properties;
Modified: incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/WorkflowConditionInstance.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/WorkflowConditionInstance.java?rev=953864&r1=953863&r2=953864&view=diff
==============================================================================
--- incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/WorkflowConditionInstance.java (original)
+++ incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/WorkflowConditionInstance.java Fri Jun 11 20:38:55 2010
@@ -1,35 +1,48 @@
-//Copyright (c) 2006, California Institute of Technology.
-//ALL RIGHTS RESERVED. U.S. Government sponsorship acknowledged.
-//
-//$Id$
-
-package gov.nasa.jpl.oodt.cas.workflow.structs;
-
-//OODT imports
-import gov.nasa.jpl.oodt.cas.metadata.Metadata;
-
-/**
- * @author mattmann
- * @version $Revsion$
- *
- * <p>
- * The actual evaluation method for the condition should be defined in any class
- * that implements this interface.
- * </p>
- */
-public interface WorkflowConditionInstance {
-
- /**
- * <p>
- * The actual conditional: this method should return <code>true</code> if
- * the condition is satisfied, otherwise, false.
- * </p>
- *
- * @param metadata
- * Any metadata needed by the conditional to determine
- * satisfaction.
- * @return true if the condition is satisfied, otherwise, false.
- */
- public boolean evaluate(Metadata metadata, WorkflowConditionConfiguration config);
-
-}
+/*
+ * 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 gov.nasa.jpl.oodt.cas.workflow.structs;
+
+//OODT imports
+import gov.nasa.jpl.oodt.cas.metadata.Metadata;
+
+/**
+ * @author mattmann
+ * @version $Revsion$
+ *
+ * <p>
+ * The actual evaluation method for the condition should be defined in any class
+ * that implements this interface.
+ * </p>
+ */
+public interface WorkflowConditionInstance {
+
+ /**
+ * <p>
+ * The actual conditional: this method should return <code>true</code> if
+ * the condition is satisfied, otherwise, false.
+ * </p>
+ *
+ * @param metadata
+ * Any metadata needed by the conditional to determine
+ * satisfaction.
+ * @return true if the condition is satisfied, otherwise, false.
+ */
+ public boolean evaluate(Metadata metadata, WorkflowConditionConfiguration config);
+
+}
Modified: incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/WorkflowInstance.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/WorkflowInstance.java?rev=953864&r1=953863&r2=953864&view=diff
==============================================================================
--- incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/WorkflowInstance.java (original)
+++ incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/WorkflowInstance.java Fri Jun 11 20:38:55 2010
@@ -1,7 +1,20 @@
-//Copyright (c) 2005, California Institute of Technology.
-//ALL RIGHTS RESERVED. U.S. Government sponsorship acknowledged.
-//
-//$Id$
+/*
+ * 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 gov.nasa.jpl.oodt.cas.workflow.structs;
Modified: incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/WorkflowInstancePage.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/WorkflowInstancePage.java?rev=953864&r1=953863&r2=953864&view=diff
==============================================================================
--- incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/WorkflowInstancePage.java (original)
+++ incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/WorkflowInstancePage.java Fri Jun 11 20:38:55 2010
@@ -1,7 +1,20 @@
-//Copyright (c) 2008, California Institute of Technology.
-//ALL RIGHTS RESERVED. U.S. Government sponsorship acknowledged.
-//
-//$Id$
+/*
+ * 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 gov.nasa.jpl.oodt.cas.workflow.structs;
Modified: incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/WorkflowStatus.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/WorkflowStatus.java?rev=953864&r1=953863&r2=953864&view=diff
==============================================================================
--- incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/WorkflowStatus.java (original)
+++ incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/WorkflowStatus.java Fri Jun 11 20:38:55 2010
@@ -1,7 +1,20 @@
-//Copyright (c) 2005, California Institute of Technology.
-//ALL RIGHTS RESERVED. U.S. Government sponsorship acknowledged.
-//
-//$Id$
+/*
+ * 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 gov.nasa.jpl.oodt.cas.workflow.structs;
@@ -31,4 +44,4 @@ public interface WorkflowStatus {
public static final String METADATA_MISSING = "METMISS";
-}
\ No newline at end of file
+}
Modified: incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/WorkflowTask.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/WorkflowTask.java?rev=953864&r1=953863&r2=953864&view=diff
==============================================================================
--- incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/WorkflowTask.java (original)
+++ incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/WorkflowTask.java Fri Jun 11 20:38:55 2010
@@ -1,7 +1,20 @@
-//Copyright (c) 2005, California Institute of Technology.
-//ALL RIGHTS RESERVED. U.S. Government sponsorship acknowledged.
-//
-//$Id$
+/*
+ * 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 gov.nasa.jpl.oodt.cas.workflow.structs;
Modified: incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/WorkflowTaskConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/WorkflowTaskConfiguration.java?rev=953864&r1=953863&r2=953864&view=diff
==============================================================================
--- incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/WorkflowTaskConfiguration.java (original)
+++ incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/WorkflowTaskConfiguration.java Fri Jun 11 20:38:55 2010
@@ -1,7 +1,20 @@
-//Copyright (c) 2005, California Institute of Technology.
-//ALL RIGHTS RESERVED. U.S. Government sponsorship acknowledged.
-//
-//$Id$
+/*
+ * 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 gov.nasa.jpl.oodt.cas.workflow.structs;
Modified: incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/WorkflowTaskInstance.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/WorkflowTaskInstance.java?rev=953864&r1=953863&r2=953864&view=diff
==============================================================================
--- incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/WorkflowTaskInstance.java (original)
+++ incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/WorkflowTaskInstance.java Fri Jun 11 20:38:55 2010
@@ -1,32 +1,45 @@
-//Copyright (c) 2006, California Institute of Technology.
-//ALL RIGHTS RESERVED. U.S. Government sponsorship acknowledged.
-//
-//$Id$
-
-package gov.nasa.jpl.oodt.cas.workflow.structs;
-
-//OODT imports
-import gov.nasa.jpl.oodt.cas.metadata.Metadata;
-import gov.nasa.jpl.oodt.cas.workflow.structs.exceptions.WorkflowTaskInstanceException;
-
-/**
- * @author mattmann
- * @version $Revsion$
- *
- * <p>The part of a WorkflowTask that is responsible
- * for actually doing the work.</p>
- */
-public interface WorkflowTaskInstance {
-
- /**
- * <p>
- * Runs the Task with the specified metadata context.
- * </p>
- *
- * @param metadata
- * The TaskContext of metadata that is shared between the tasks.
- *
- * @param config The static configuration metadata for this task.
- */
- public void run(Metadata metadata, WorkflowTaskConfiguration config) throws WorkflowTaskInstanceException;
-}
+/*
+ * 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 gov.nasa.jpl.oodt.cas.workflow.structs;
+
+//OODT imports
+import gov.nasa.jpl.oodt.cas.metadata.Metadata;
+import gov.nasa.jpl.oodt.cas.workflow.structs.exceptions.WorkflowTaskInstanceException;
+
+/**
+ * @author mattmann
+ * @version $Revsion$
+ *
+ * <p>The part of a WorkflowTask that is responsible
+ * for actually doing the work.</p>
+ */
+public interface WorkflowTaskInstance {
+
+ /**
+ * <p>
+ * Runs the Task with the specified metadata context.
+ * </p>
+ *
+ * @param metadata
+ * The TaskContext of metadata that is shared between the tasks.
+ *
+ * @param config The static configuration metadata for this task.
+ */
+ public void run(Metadata metadata, WorkflowTaskConfiguration config) throws WorkflowTaskInstanceException;
+}
Modified: incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/exceptions/EngineException.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/exceptions/EngineException.java?rev=953864&r1=953863&r2=953864&view=diff
==============================================================================
--- incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/exceptions/EngineException.java (original)
+++ incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/exceptions/EngineException.java Fri Jun 11 20:38:55 2010
@@ -1,53 +1,66 @@
-//Copyright (c) 2005, California Institute of Technology.
-//ALL RIGHTS RESERVED. U.S. Government sponsorship acknowledged.
-//
-//$Id$
-
-package gov.nasa.jpl.oodt.cas.workflow.structs.exceptions;
-
-/**
- * @author mattmann
- * @version $Revision$
- *
- * <p>An exception throw by the Workflow Engine.</p>
- *
- */
-public class EngineException extends Exception {
-
- /* serial version UID */
- private static final long serialVersionUID = 3690762773826910000L;
-
- /**
- *
- */
- public EngineException() {
- super();
- // TODO Auto-generated constructor stub
- }
-
- /**
- * @param message
- */
- public EngineException(String message) {
- super(message);
- // TODO Auto-generated constructor stub
- }
-
- /**
- * @param cause
- */
- public EngineException(Throwable cause) {
- super(cause);
- // TODO Auto-generated constructor stub
- }
-
- /**
- * @param message
- * @param cause
- */
- public EngineException(String message, Throwable cause) {
- super(message, cause);
- // TODO Auto-generated constructor stub
- }
-
-}
+/*
+ * 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 gov.nasa.jpl.oodt.cas.workflow.structs.exceptions;
+
+/**
+ * @author mattmann
+ * @version $Revision$
+ *
+ * <p>An exception throw by the Workflow Engine.</p>
+ *
+ */
+public class EngineException extends Exception {
+
+ /* serial version UID */
+ private static final long serialVersionUID = 3690762773826910000L;
+
+ /**
+ *
+ */
+ public EngineException() {
+ super();
+ // TODO Auto-generated constructor stub
+ }
+
+ /**
+ * @param message
+ */
+ public EngineException(String message) {
+ super(message);
+ // TODO Auto-generated constructor stub
+ }
+
+ /**
+ * @param cause
+ */
+ public EngineException(Throwable cause) {
+ super(cause);
+ // TODO Auto-generated constructor stub
+ }
+
+ /**
+ * @param message
+ * @param cause
+ */
+ public EngineException(String message, Throwable cause) {
+ super(message, cause);
+ // TODO Auto-generated constructor stub
+ }
+
+}
Modified: incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/exceptions/InstanceRepositoryException.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/exceptions/InstanceRepositoryException.java?rev=953864&r1=953863&r2=953864&view=diff
==============================================================================
--- incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/exceptions/InstanceRepositoryException.java (original)
+++ incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/exceptions/InstanceRepositoryException.java Fri Jun 11 20:38:55 2010
@@ -1,7 +1,20 @@
-//Copyright (c) 2006, California Institute of Technology.
-//ALL RIGHTS RESERVED. U.S. Government sponsorship acknowledged.
-//
-//$Id$
+/*
+ * 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 gov.nasa.jpl.oodt.cas.workflow.structs.exceptions;
Modified: incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/exceptions/RepositoryException.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/exceptions/RepositoryException.java?rev=953864&r1=953863&r2=953864&view=diff
==============================================================================
--- incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/exceptions/RepositoryException.java (original)
+++ incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/exceptions/RepositoryException.java Fri Jun 11 20:38:55 2010
@@ -1,7 +1,20 @@
-//Copyright (c) 2005, California Institute of Technology.
-//ALL RIGHTS RESERVED. U.S. Government sponsorship acknowledged.
-//
-//$Id$
+/*
+ * 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 gov.nasa.jpl.oodt.cas.workflow.structs.exceptions;
Modified: incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/exceptions/WorkflowTaskInstanceException.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/exceptions/WorkflowTaskInstanceException.java?rev=953864&r1=953863&r2=953864&view=diff
==============================================================================
--- incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/exceptions/WorkflowTaskInstanceException.java (original)
+++ incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/structs/exceptions/WorkflowTaskInstanceException.java Fri Jun 11 20:38:55 2010
@@ -1,7 +1,20 @@
-//Copyright (c) 2008, California Institute of Technology.
-//ALL RIGHTS RESERVED. U.S. Government sponsorship acknowledged.
-//
-//$Id$
+/*
+ * 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 gov.nasa.jpl.oodt.cas.workflow.structs.exceptions;
Modified: incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/system/XmlRpcWorkflowManager.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/system/XmlRpcWorkflowManager.java?rev=953864&r1=953863&r2=953864&view=diff
==============================================================================
--- incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/system/XmlRpcWorkflowManager.java (original)
+++ incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/system/XmlRpcWorkflowManager.java Fri Jun 11 20:38:55 2010
@@ -1,7 +1,20 @@
-//Copyright (c) 2005, California Institute of Technology.
-//ALL RIGHTS RESERVED. U.S. Government sponsorship acknowledged.
-//
-//$Id$
+/*
+ * 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 gov.nasa.jpl.oodt.cas.workflow.system;
Modified: incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/system/XmlRpcWorkflowManagerClient.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/system/XmlRpcWorkflowManagerClient.java?rev=953864&r1=953863&r2=953864&view=diff
==============================================================================
--- incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/system/XmlRpcWorkflowManagerClient.java (original)
+++ incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/system/XmlRpcWorkflowManagerClient.java Fri Jun 11 20:38:55 2010
@@ -1,7 +1,20 @@
-//Copyright (c) 2005, California Institute of Technology.
-//ALL RIGHTS RESERVED. U.S. Government sponsorship acknowledged.
-//
-//$Id$
+/*
+ * 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 gov.nasa.jpl.oodt.cas.workflow.system;
Modified: incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/util/DbStructFactory.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/util/DbStructFactory.java?rev=953864&r1=953863&r2=953864&view=diff
==============================================================================
--- incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/util/DbStructFactory.java (original)
+++ incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/util/DbStructFactory.java Fri Jun 11 20:38:55 2010
@@ -1,7 +1,20 @@
-//Copyright (c) 2005, California Institute of Technology.
-//ALL RIGHTS RESERVED. U.S. Government sponsorship acknowledged.
-//
-//$Id$
+/*
+ * 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 gov.nasa.jpl.oodt.cas.workflow.util;
Modified: incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/util/GenericWorkflowObjectFactory.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/util/GenericWorkflowObjectFactory.java?rev=953864&r1=953863&r2=953864&view=diff
==============================================================================
--- incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/util/GenericWorkflowObjectFactory.java (original)
+++ incubator/oodt/trunk/workflow/src/main/java/gov/nasa/jpl/oodt/cas/workflow/util/GenericWorkflowObjectFactory.java Fri Jun 11 20:38:55 2010
@@ -1,7 +1,20 @@
-//Copyright (c) 2005, California Institute of Technology.
-//ALL RIGHTS RESERVED. U.S. Government sponsorship acknowledged.
-//
-//$Id$
+/*
+ * 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 gov.nasa.jpl.oodt.cas.workflow.util;