adding model classes for workflow models
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/72a6f6a5 Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/72a6f6a5 Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/72a6f6a5 Branch: refs/heads/master Commit: 72a6f6a5aa22ee5c70b5088fbd1daa40370daffc Parents: c451723 Author: Chathuri Wimalasena <[email protected]> Authored: Mon Feb 1 15:10:29 2016 -0500 Committer: Chathuri Wimalasena <[email protected]> Committed: Mon Feb 1 15:10:29 2016 -0500 ---------------------------------------------------------------------- .../workflow/catalog/model/ComponentStatus.java | 78 +++++++++ .../core/workflow/catalog/model/Edge.java | 103 ++++++++++++ .../core/workflow/catalog/model/Edge_PK.java | 64 +++++++ .../core/workflow/catalog/model/Node.java | 124 ++++++++++++++ .../core/workflow/catalog/model/Node_PK.java | 64 +++++++ .../core/workflow/catalog/model/Port.java | 102 ++++++++++++ .../core/workflow/catalog/model/Port_PK.java | 64 +++++++ .../core/workflow/catalog/model/Workflow.java | 124 ++++++++++++++ .../catalog/model/WorkflowInput_PK.java | 64 +++++++ .../catalog/model/WorkflowIntInput.java | 166 +++++++++++++++++++ .../workflow/catalog/model/WorkflowOutput.java | 156 +++++++++++++++++ .../catalog/model/WorkflowOutput_PK.java | 64 +++++++ .../workflow/catalog/model/WorkflowStatus.java | 103 ++++++++++++ .../catalog/model/WorkflowStatus_PK.java | 64 +++++++ .../src/main/resources/workflow-derby.sql | 6 + .../src/main/resources/workflow-mysql.sql | 6 + 16 files changed, 1352 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata/blob/72a6f6a5/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/ComponentStatus.java ---------------------------------------------------------------------- diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/ComponentStatus.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/ComponentStatus.java new file mode 100644 index 0000000..b6353b4 --- /dev/null +++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/ComponentStatus.java @@ -0,0 +1,78 @@ +/* + * + * 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.airavata.registry.core.workflow.catalog.model; + + +import javax.persistence.*; +import java.io.Serializable; +import java.sql.Timestamp; + +@Entity +@Table(name = "COMPONENT_STATUS") +public class ComponentStatus implements Serializable { + + @Id + @Column(name = "STATUS_ID") + private String statusId; + + @Column(name = "STATE") + private String state; + + @Column(name = "REASON") + private String reason; + + @Column(name = "UPDATE_TIME") + private Timestamp updateTime; + + public String getStatusId() { + return statusId; + } + + public void setStatusId(String statusId) { + this.statusId = statusId; + } + + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + public String getReason() { + return reason; + } + + public void setReason(String reason) { + this.reason = reason; + } + + public Timestamp getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Timestamp updateTime) { + this.updateTime = updateTime; + } +} + http://git-wip-us.apache.org/repos/asf/airavata/blob/72a6f6a5/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/Edge.java ---------------------------------------------------------------------- diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/Edge.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/Edge.java new file mode 100644 index 0000000..48ececb --- /dev/null +++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/Edge.java @@ -0,0 +1,103 @@ +/* + * + * 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.airavata.registry.core.workflow.catalog.model; + + +import javax.persistence.*; +import java.io.Serializable; +import java.sql.Timestamp; + +@Entity +@Table(name = "EDGE") +@IdClass(Edge_PK.class) +public class Edge implements Serializable { + + @Id + @Column(name = "TEMPLATE_ID") + private String templateId; + + @Id + @Column(name = "EDGE_ID") + private String edgeId; + + @Column(name = "NAME") + private String name; + + @Column(name = "COMPONENT_STATUS_ID") + private String componentStatusId; + + @Column(name = "DESCRIPTION") + private String description; + + @ManyToOne(cascade= CascadeType.MERGE) + @JoinColumn(name = "TEMPLATE_ID") + private Workflow workflow; + + public String getTemplateId() { + return templateId; + } + + public void setTemplateId(String templateId) { + this.templateId = templateId; + } + + public String getEdgeId() { + return edgeId; + } + + public void setEdgeId(String edgeId) { + this.edgeId = edgeId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getComponentStatusId() { + return componentStatusId; + } + + public void setComponentStatusId(String componentStatusId) { + this.componentStatusId = componentStatusId; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public Workflow getWorkflow() { + return workflow; + } + + public void setWorkflow(Workflow workflow) { + this.workflow = workflow; + } +} + http://git-wip-us.apache.org/repos/asf/airavata/blob/72a6f6a5/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/Edge_PK.java ---------------------------------------------------------------------- diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/Edge_PK.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/Edge_PK.java new file mode 100644 index 0000000..dedbb45 --- /dev/null +++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/Edge_PK.java @@ -0,0 +1,64 @@ +/* + * + * 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.airavata.registry.core.workflow.catalog.model; + +import java.io.Serializable; + +public class Edge_PK implements Serializable { + private String templateID; + private String edgeId; + + public Edge_PK(String templateId, String edgeId) { + this.templateID = templateId; + this.edgeId = edgeId; + } + + public Edge_PK() { + ; + } + + @Override + public boolean equals(Object o) { + return false; + } + + @Override + public int hashCode() { + return 1; + } + + public String getTemplateID() { + return templateID; + } + + public void setTemplateID(String templateID) { + this.templateID = templateID; + } + + public String getEdgeId() { + return edgeId; + } + + public void setEdgeId(String edgeId) { + this.edgeId = edgeId; + } +} http://git-wip-us.apache.org/repos/asf/airavata/blob/72a6f6a5/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/Node.java ---------------------------------------------------------------------- diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/Node.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/Node.java new file mode 100644 index 0000000..0711ad5 --- /dev/null +++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/Node.java @@ -0,0 +1,124 @@ +/* + * + * 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.airavata.registry.core.workflow.catalog.model; + + +import javax.persistence.*; +import java.io.Serializable; + +@Entity +@Table(name = "NODE") +@IdClass(Node_PK.class) +public class Node implements Serializable { + + @Id + @Column(name = "TEMPLATE_ID") + private String templateId; + + @Id + @Column(name = "NODE_ID") + private String nodeId; + + @Column(name = "NAME") + private String name; + + @Column(name = "COMPONENT_STATUS_ID") + private String componentStatusId; + + @Column(name = "DESCRIPTION") + private String description; + + @Column(name = "APPLICATION_ID") + private String applicationId; + + @Column(name = "APPLICATION_NAME") + private String applicationName; + + @ManyToOne(cascade= CascadeType.MERGE) + @JoinColumn(name = "TEMPLATE_ID") + private Workflow workflow; + + public String getTemplateId() { + return templateId; + } + + public void setTemplateId(String templateId) { + this.templateId = templateId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getComponentStatusId() { + return componentStatusId; + } + + public void setComponentStatusId(String componentStatusId) { + this.componentStatusId = componentStatusId; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public Workflow getWorkflow() { + return workflow; + } + + public void setWorkflow(Workflow workflow) { + this.workflow = workflow; + } + + public String getNodeId() { + return nodeId; + } + + public void setNodeId(String nodeId) { + this.nodeId = nodeId; + } + + public String getApplicationId() { + return applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + public String getApplicationName() { + return applicationName; + } + + public void setApplicationName(String applicationName) { + this.applicationName = applicationName; + } +} + http://git-wip-us.apache.org/repos/asf/airavata/blob/72a6f6a5/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/Node_PK.java ---------------------------------------------------------------------- diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/Node_PK.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/Node_PK.java new file mode 100644 index 0000000..d9ee7a2 --- /dev/null +++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/Node_PK.java @@ -0,0 +1,64 @@ +/* + * + * 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.airavata.registry.core.workflow.catalog.model; + +import java.io.Serializable; + +public class Node_PK implements Serializable { + private String templateID; + private String nodeId; + + public Node_PK(String templateId, String nodeId) { + this.templateID = templateId; + this.nodeId = nodeId; + } + + public Node_PK() { + ; + } + + @Override + public boolean equals(Object o) { + return false; + } + + @Override + public int hashCode() { + return 1; + } + + public String getTemplateID() { + return templateID; + } + + public void setTemplateID(String templateID) { + this.templateID = templateID; + } + + public String getNodeId() { + return nodeId; + } + + public void setNodeId(String nodeId) { + this.nodeId = nodeId; + } +} http://git-wip-us.apache.org/repos/asf/airavata/blob/72a6f6a5/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/Port.java ---------------------------------------------------------------------- diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/Port.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/Port.java new file mode 100644 index 0000000..f0be41f --- /dev/null +++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/Port.java @@ -0,0 +1,102 @@ +/* + * + * 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.airavata.registry.core.workflow.catalog.model; + + +import javax.persistence.*; +import java.io.Serializable; + +@Entity +@Table(name = "PORT") +@IdClass(Port_PK.class) +public class Port implements Serializable { + + @Id + @Column(name = "TEMPLATE_ID") + private String templateId; + + @Id + @Column(name = "PORT_ID") + private String portId; + + @Column(name = "NAME") + private String name; + + @Column(name = "COMPONENT_STATUS_ID") + private String componentStatusId; + + @Column(name = "DESCRIPTION") + private String description; + + @ManyToOne(cascade= CascadeType.MERGE) + @JoinColumn(name = "TEMPLATE_ID") + private Workflow workflow; + + public String getTemplateId() { + return templateId; + } + + public void setTemplateId(String templateId) { + this.templateId = templateId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getComponentStatusId() { + return componentStatusId; + } + + public void setComponentStatusId(String componentStatusId) { + this.componentStatusId = componentStatusId; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public Workflow getWorkflow() { + return workflow; + } + + public void setWorkflow(Workflow workflow) { + this.workflow = workflow; + } + + public String getPortId() { + return portId; + } + + public void setPortId(String portId) { + this.portId = portId; + } +} + http://git-wip-us.apache.org/repos/asf/airavata/blob/72a6f6a5/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/Port_PK.java ---------------------------------------------------------------------- diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/Port_PK.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/Port_PK.java new file mode 100644 index 0000000..a0305ed --- /dev/null +++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/Port_PK.java @@ -0,0 +1,64 @@ +/* + * + * 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.airavata.registry.core.workflow.catalog.model; + +import java.io.Serializable; + +public class Port_PK implements Serializable { + private String templateID; + private String portId; + + public Port_PK(String templateId, String portId) { + this.templateID = templateId; + this.portId = portId; + } + + public Port_PK() { + ; + } + + @Override + public boolean equals(Object o) { + return false; + } + + @Override + public int hashCode() { + return 1; + } + + public String getTemplateID() { + return templateID; + } + + public void setTemplateID(String templateID) { + this.templateID = templateID; + } + + public String getPortId() { + return portId; + } + + public void setPortId(String portId) { + this.portId = portId; + } +} http://git-wip-us.apache.org/repos/asf/airavata/blob/72a6f6a5/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/Workflow.java ---------------------------------------------------------------------- diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/Workflow.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/Workflow.java new file mode 100644 index 0000000..258342e --- /dev/null +++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/Workflow.java @@ -0,0 +1,124 @@ +/* + * + * 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.airavata.registry.core.workflow.catalog.model; + + +import javax.persistence.*; +import java.io.Serializable; +import java.sql.Timestamp; + +@Entity +@Table(name = "WORKFLOW") +public class Workflow implements Serializable { + + @Id + @Column(name = "TEMPLATE_ID") + private String templateId; + + @Column(name = "CREATED_USER") + private String createdUser; + + @Lob + @Column(name = "GRAPH") + private char[] graph; + + @Column(name = "WORKFLOW_NAME") + private String workflowName; + + @Column(name = "CREATION_TIME") + private Timestamp creationTime; + + @Column(name = "UPDATE_TIME") + private Timestamp updateTime; + + @Lob + @Column(name = "IMAGE") + private byte[] image; + + @Column(name = "GATEWAY_ID") + private String gatewayId; + + public String getGatewayId() { + return gatewayId; + } + + public void setGatewayId(String gatewayId) { + this.gatewayId = gatewayId; + } + + public Timestamp getCreationTime() { + return creationTime; + } + + public void setCreationTime(Timestamp creationTime) { + this.creationTime = creationTime; + } + + public Timestamp getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Timestamp updateTime) { + this.updateTime = updateTime; + } + + public String getTemplateId() { + return templateId; + } + + public void setTemplateId(String templateId) { + this.templateId = templateId; + } + + public String getCreatedUser() { + return createdUser; + } + + public void setCreatedUser(String createdUser) { + this.createdUser = createdUser; + } + + public char[] getGraph() { + return graph; + } + + public void setGraph(char[] graph) { + this.graph = graph; + } + + public String getWorkflowName() { + return workflowName; + } + + public void setWorkflowName(String workflowName) { + this.workflowName = workflowName; + } + + public byte[] getImage() { + return image; + } + + public void setImage(byte[] image) { + this.image = image; + } +} + http://git-wip-us.apache.org/repos/asf/airavata/blob/72a6f6a5/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/WorkflowInput_PK.java ---------------------------------------------------------------------- diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/WorkflowInput_PK.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/WorkflowInput_PK.java new file mode 100644 index 0000000..b84ae6b --- /dev/null +++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/WorkflowInput_PK.java @@ -0,0 +1,64 @@ +/* + * + * 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.airavata.registry.core.workflow.catalog.model; + +import java.io.Serializable; + +public class WorkflowInput_PK implements Serializable { + private String templateID; + private String inputKey; + + public WorkflowInput_PK(String templateId, String inputKey) { + this.templateID = templateId; + this.inputKey = inputKey; + } + + public WorkflowInput_PK() { + ; + } + + @Override + public boolean equals(Object o) { + return false; + } + + @Override + public int hashCode() { + return 1; + } + + public String getTemplateID() { + return templateID; + } + + public void setTemplateID(String templateID) { + this.templateID = templateID; + } + + public String getInputKey() { + return inputKey; + } + + public void setInputKey(String inputKey) { + this.inputKey = inputKey; + } +} http://git-wip-us.apache.org/repos/asf/airavata/blob/72a6f6a5/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/WorkflowIntInput.java ---------------------------------------------------------------------- diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/WorkflowIntInput.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/WorkflowIntInput.java new file mode 100644 index 0000000..c8d4952 --- /dev/null +++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/WorkflowIntInput.java @@ -0,0 +1,166 @@ +/* + * + * 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.airavata.registry.core.workflow.catalog.model; + + +import javax.persistence.*; +import java.io.Serializable; + +@Entity +@Table(name = "WORKFLOW_INPUT") +@IdClass(WorkflowInput_PK.class) +public class WorkflowIntInput implements Serializable { + @Id + @Column(name = "INTERFACE_ID") + private String templateID; + @Id + @Column(name = "INPUT_KEY") + private String inputKey; + @Column(name = "INPUT_VALUE") + private String inputVal; + @Column(name = "DATA_TYPE") + private String dataType; + @Column(name = "METADATA") + private String metadata; + @Column(name = "APP_ARGUMENT") + private String appArgument; + @Column(name = "USER_FRIENDLY_DESC") + private String userFriendlyDesc; + @Column(name = "STANDARD_INPUT") + private boolean standardInput; + @Column(name="INPUT_ORDER") + private int inputOrder; + @Column(name="IS_REQUIRED") + private boolean isRequired; + @Column(name="REQUIRED_TO_COMMANDLINE") + private boolean requiredToCMD; + @Column(name = "DATA_STAGED") + private boolean dataStaged; + + @ManyToOne(cascade= CascadeType.MERGE) + @JoinColumn(name = "TEMPLATE_ID") + private Workflow workflow; + + public String getTemplateID() { + return templateID; + } + + public void setTemplateID(String templateID) { + this.templateID = templateID; + } + + public String getInputKey() { + return inputKey; + } + + public void setInputKey(String inputKey) { + this.inputKey = inputKey; + } + + public String getInputVal() { + return inputVal; + } + + public void setInputVal(String inputVal) { + this.inputVal = inputVal; + } + + public String getDataType() { + return dataType; + } + + public void setDataType(String dataType) { + this.dataType = dataType; + } + + public String getMetadata() { + return metadata; + } + + public void setMetadata(String metadata) { + this.metadata = metadata; + } + + public String getAppArgument() { + return appArgument; + } + + public void setAppArgument(String appArgument) { + this.appArgument = appArgument; + } + + public String getUserFriendlyDesc() { + return userFriendlyDesc; + } + + public void setUserFriendlyDesc(String userFriendlyDesc) { + this.userFriendlyDesc = userFriendlyDesc; + } + + public Workflow getWorkflow() { + return workflow; + } + + public void setWorkflow(Workflow workflow) { + this.workflow = workflow; + } + + public boolean isStandardInput() { + return standardInput; + } + + public void setStandardInput(boolean standardInput) { + this.standardInput = standardInput; + } + + public int getInputOrder() { + return inputOrder; + } + + public void setInputOrder(int inputOrder) { + this.inputOrder = inputOrder; + } + + public boolean isRequired() { + return isRequired; + } + + public void setRequired(boolean isRequired) { + this.isRequired = isRequired; + } + + public boolean isRequiredToCMD() { + return requiredToCMD; + } + + public void setRequiredToCMD(boolean requiredToCMD) { + this.requiredToCMD = requiredToCMD; + } + + public boolean isDataStaged() { + return dataStaged; + } + + public void setDataStaged(boolean dataStaged) { + this.dataStaged = dataStaged; + } +} http://git-wip-us.apache.org/repos/asf/airavata/blob/72a6f6a5/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/WorkflowOutput.java ---------------------------------------------------------------------- diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/WorkflowOutput.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/WorkflowOutput.java new file mode 100644 index 0000000..2131557 --- /dev/null +++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/WorkflowOutput.java @@ -0,0 +1,156 @@ +/* + * + * 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.airavata.registry.core.workflow.catalog.model; + + +import javax.persistence.*; +import java.io.Serializable; + +@Entity +@Table(name = "WORKFLOW_OUTPUT") +@IdClass(WorkflowOutput_PK.class) +public class WorkflowOutput implements Serializable { + @Id + @Column(name = "TEMPLATE_ID") + private String templateId; + @Id + @Column(name = "OUTPUT_KEY") + private String outputKey; + @Column(name = "OUTPUT_VALUE") + private String outputVal; + @Column(name = "DATA_TYPE") + private String dataType; + @Column(name = "IS_REQUIRED") + private boolean isRequired; + @Column(name="REQUIRED_TO_COMMANDLINE") + private boolean requiredToCMD; + @Column(name = "DATA_MOVEMENT") + private boolean dataMovement; + @Column(name = "DATA_NAME_LOCATION") + private String dataNameLocation; + @Column(name = "SEARCH_QUERY") + private String searchQuery; + @Column(name = "APP_ARGUMENT") + private String applicationArgument; + @Column(name = "OUTPUT_STREAMING") + private boolean outputStreaming; + + @ManyToOne(cascade= CascadeType.MERGE) + @JoinColumn(name = "TEMPLATE_ID") + private Workflow workflow; + + public String getTemplateId() { + return templateId; + } + + public void setTemplateId(String templateId) { + this.templateId = templateId; + } + + public String getDataType() { + return dataType; + } + + public void setDataType(String dataType) { + this.dataType = dataType; + } + + public Workflow getWorkflow() { + return workflow; + } + + public void setWorkflow(Workflow workflow) { + this.workflow = workflow; + } + + public String getOutputKey() { + return outputKey; + } + + public void setOutputKey(String outputKey) { + this.outputKey = outputKey; + } + + public String getOutputVal() { + return outputVal; + } + + public void setOutputVal(String outputVal) { + this.outputVal = outputVal; + } + + public boolean isRequired() { + return isRequired; + } + + public void setRequired(boolean isRequired) { + this.isRequired = isRequired; + } + + public boolean isRequiredToCMD() { + return requiredToCMD; + } + + public void setRequiredToCMD(boolean requiredToCMD) { + this.requiredToCMD = requiredToCMD; + } + + public boolean isDataMovement() { + return dataMovement; + } + + public void setDataMovement(boolean dataMovement) { + this.dataMovement = dataMovement; + } + + public String getDataNameLocation() { + return dataNameLocation; + } + + public void setDataNameLocation(String dataNameLocation) { + this.dataNameLocation = dataNameLocation; + } + + public String getSearchQuery() { + return searchQuery; + } + + public void setSearchQuery(String searchQuery) { + this.searchQuery = searchQuery; + } + + public String getApplicationArgument() { + return applicationArgument; + } + + public void setApplicationArgument(String applicationArgument) { + this.applicationArgument = applicationArgument; + } + + public boolean isOutputStreaming() { + return outputStreaming; + } + + public void setOutputStreaming(boolean outputStreaming) { + this.outputStreaming = outputStreaming; + } +} http://git-wip-us.apache.org/repos/asf/airavata/blob/72a6f6a5/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/WorkflowOutput_PK.java ---------------------------------------------------------------------- diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/WorkflowOutput_PK.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/WorkflowOutput_PK.java new file mode 100644 index 0000000..d36f2ca --- /dev/null +++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/WorkflowOutput_PK.java @@ -0,0 +1,64 @@ +/* + * + * 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.airavata.registry.core.workflow.catalog.model; + +import java.io.Serializable; + +public class WorkflowOutput_PK implements Serializable { + private String templateID; + private String outputKey; + + public WorkflowOutput_PK(String templateId, String outputKey) { + this.templateID = templateId; + this.outputKey = outputKey; + } + + public WorkflowOutput_PK() { + ; + } + + @Override + public boolean equals(Object o) { + return false; + } + + @Override + public int hashCode() { + return 1; + } + + public String getTemplateID() { + return templateID; + } + + public void setTemplateID(String templateID) { + this.templateID = templateID; + } + + public String getOutputKey() { + return outputKey; + } + + public void setOutputKey(String outputKey) { + this.outputKey = outputKey; + } +} http://git-wip-us.apache.org/repos/asf/airavata/blob/72a6f6a5/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/WorkflowStatus.java ---------------------------------------------------------------------- diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/WorkflowStatus.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/WorkflowStatus.java new file mode 100644 index 0000000..2fc9e47 --- /dev/null +++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/WorkflowStatus.java @@ -0,0 +1,103 @@ +/* + * + * 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.airavata.registry.core.workflow.catalog.model; + + +import javax.persistence.*; +import java.io.Serializable; +import java.sql.Timestamp; + +@Entity +@Table(name = "WORKFLOW_STATUS") +@IdClass(WorkflowStatus_PK.class) +public class WorkflowStatus implements Serializable { + + @Id + @Column(name = "STATUS_ID") + private String statusId; + + @Id + @Column(name = "TEMPLATE_ID") + private String templateId; + + @Column(name = "STATE") + private String state; + + @Column(name = "REASON") + private String reason; + + @Column(name = "UPDATE_TIME") + private Timestamp updateTime; + + @ManyToOne(cascade= CascadeType.MERGE) + @JoinColumn(name = "TEMPLATE_ID") + private Workflow workflow; + + public String getStatusId() { + return statusId; + } + + public void setStatusId(String statusId) { + this.statusId = statusId; + } + + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + public String getReason() { + return reason; + } + + public void setReason(String reason) { + this.reason = reason; + } + + public Timestamp getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Timestamp updateTime) { + this.updateTime = updateTime; + } + + public String getTemplateId() { + return templateId; + } + + public void setTemplateId(String templateId) { + this.templateId = templateId; + } + + public Workflow getWorkflow() { + return workflow; + } + + public void setWorkflow(Workflow workflow) { + this.workflow = workflow; + } +} + http://git-wip-us.apache.org/repos/asf/airavata/blob/72a6f6a5/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/WorkflowStatus_PK.java ---------------------------------------------------------------------- diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/WorkflowStatus_PK.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/WorkflowStatus_PK.java new file mode 100644 index 0000000..ac33cc9 --- /dev/null +++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/workflow/catalog/model/WorkflowStatus_PK.java @@ -0,0 +1,64 @@ +/* + * + * 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.airavata.registry.core.workflow.catalog.model; + +import java.io.Serializable; + +public class WorkflowStatus_PK implements Serializable { + private String templateID; + private String statusId; + + public WorkflowStatus_PK(String templateId, String statusId) { + this.templateID = templateId; + this.statusId = statusId; + } + + public WorkflowStatus_PK() { + ; + } + + @Override + public boolean equals(Object o) { + return false; + } + + @Override + public int hashCode() { + return 1; + } + + public String getTemplateID() { + return templateID; + } + + public void setTemplateID(String templateID) { + this.templateID = templateID; + } + + public String getStatusId() { + return statusId; + } + + public void setStatusId(String statusId) { + this.statusId = statusId; + } +} http://git-wip-us.apache.org/repos/asf/airavata/blob/72a6f6a5/modules/registry/registry-core/src/main/resources/workflow-derby.sql ---------------------------------------------------------------------- diff --git a/modules/registry/registry-core/src/main/resources/workflow-derby.sql b/modules/registry/registry-core/src/main/resources/workflow-derby.sql index e798824..f2af1be 100644 --- a/modules/registry/registry-core/src/main/resources/workflow-derby.sql +++ b/modules/registry/registry-core/src/main/resources/workflow-derby.sql @@ -23,8 +23,12 @@ CREATE TABLE WORKFLOW ( TEMPLATE_ID VARCHAR (255) NOT NULL, WORKFLOW_NAME VARCHAR (255) NOT NULL, + CREATED_USER VARCHAR (255), + GATEWAY_ID VARCHAR (255), GRAPH CLOB, IMAGE BLOB, + CREATION_TIME timestamp DEFAULT CURRENT_TIMESTAMP, + UPDATE_TIME timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (TEMPLATE_ID) ); @@ -69,6 +73,7 @@ CREATE TABLE COMPONENT_STATUS STATE VARCHAR(255), REASON VARCHAR(255), PRIMARY KEY (STATUS_ID) + UPDATE_TIME timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, ); CREATE TABLE WORKFLOW_STATUS @@ -77,6 +82,7 @@ CREATE TABLE WORKFLOW_STATUS TEMPLATE_ID VARCHAR (255) NOT NULL, STATE VARCHAR(255), REASON VARCHAR(255), + UPDATE_TIME timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (STATUS_ID, COMPONENT_ID), FOREIGN KEY (TEMPLATE_ID) REFERENCES WORKFLOW(TEMPLATE_ID) ON DELETE CASCADE ); http://git-wip-us.apache.org/repos/asf/airavata/blob/72a6f6a5/modules/registry/registry-core/src/main/resources/workflow-mysql.sql ---------------------------------------------------------------------- diff --git a/modules/registry/registry-core/src/main/resources/workflow-mysql.sql b/modules/registry/registry-core/src/main/resources/workflow-mysql.sql index 945a912..d723343 100644 --- a/modules/registry/registry-core/src/main/resources/workflow-mysql.sql +++ b/modules/registry/registry-core/src/main/resources/workflow-mysql.sql @@ -23,8 +23,12 @@ CREATE TABLE WORKFLOW ( TEMPLATE_ID VARCHAR (255) NOT NULL, WORKFLOW_NAME VARCHAR (255) NOT NULL, + CREATED_USER VARCHAR (255), + GATEWAY_ID VARCHAR (255), GRAPH LONGTEXT, IMAGE BLOB, + CREATION_TIME timestamp DEFAULT CURRENT_TIMESTAMP, + UPDATE_TIME timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (TEMPLATE_ID) ); @@ -68,6 +72,7 @@ CREATE TABLE COMPONENT_STATUS STATUS_ID VARCHAR (255) NOT NULL, STATE VARCHAR(255), REASON VARCHAR(255), + UPDATE_TIME timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (STATUS_ID) ); @@ -77,6 +82,7 @@ CREATE TABLE WORKFLOW_STATUS TEMPLATE_ID VARCHAR (255) NOT NULL, STATE VARCHAR(255), REASON VARCHAR(255), + UPDATE_TIME timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (STATUS_ID, COMPONENT_ID), FOREIGN KEY (TEMPLATE_ID) REFERENCES WORKFLOW(TEMPLATE_ID) ON DELETE CASCADE );
