This is an automated email from the ASF dual-hosted git repository.
dimuthuupe pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-data-lake.git
The following commit(s) were added to refs/heads/master by this push:
new 77dbe7e Data parser register and list APIs
77dbe7e is described below
commit 77dbe7e737e92e4962de678086713a0acaebe632
Author: Dimuthu Wannipurage <[email protected]>
AuthorDate: Mon Jul 26 16:30:59 2021 -0400
Data parser register and list APIs
---
.../DataOrchestratorEventRepository.java | 14 ---
.../registry/persistance/EventStatus.java | 11 --
.../{ => entity}/DataOrchestratorEntity.java | 19 +++-
.../registry/persistance/entity/EventStatus.java | 28 +++++
.../persistance/{ => entity}/WorkflowEntity.java | 19 +++-
.../{ => entity}/WorkflowTaskEntity.java | 20 +++-
.../entity/parser/DataParserEntity.java | 115 ++++++++++++++++++++
.../parser/DataParserInputInterfaceEntity.java | 84 +++++++++++++++
.../parser/DataParserOutputInterfaceEntity.java | 84 +++++++++++++++
.../entity/parser/DataParsingJobEntity.java | 83 ++++++++++++++
.../entity/parser/DataParsingJobInputEntity.java | 94 ++++++++++++++++
.../entity/parser/DataParsingJobOutputEntity.java | 94 ++++++++++++++++
.../entity/parser/DataParsingJobOutputType.java | 24 +++++
.../DataOrchestratorEventRepository.java | 32 ++++++
.../repository/DataParserEntityRepository.java | 25 +++++
.../DataParserInputInterfaceEntityRepository.java | 24 +++++
.../DataParserOutputInterfaceEntityRepository.java | 24 +++++
.../repository/DataParsingJobEntityRepository.java | 24 +++++
.../{ => repository}/WorkflowEntityRepository.java | 3 +-
.../data-orchestrator-api-server/pom.xml | 10 +-
.../orchestrator/APIServerInitializer.java | 3 +-
.../airavata/datalake/orchestrator/OrchClient.java | 91 ++++++++++++++++
.../orchestrator/connectors/DRMSConnector.java | 6 +-
.../{ => async}/OrchestratorEventHandler.java | 21 +++-
.../handlers/grpc/DataParserApiHandler.java | 118 ++++++++++++++++++++
.../processor/InboundEventProcessor.java | 6 +-
.../processor/OutboundEventProcessor.java | 6 +-
.../data-orchestrator-api-stub/pom.xml | 76 +++++++++++++
.../src/main/proto/parsing.proto | 120 +++++++++++++++++++++
.../data-orchestrator-service/pom.xml | 1 +
30 files changed, 1234 insertions(+), 45 deletions(-)
diff --git
a/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/DataOrchestratorEventRepository.java
b/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/DataOrchestratorEventRepository.java
deleted file mode 100644
index e16fe32..0000000
---
a/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/DataOrchestratorEventRepository.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package org.apache.airavata.datalake.orchestrator.registry.persistance;
-
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.Query;
-
-import java.util.List;
-
-public interface DataOrchestratorEventRepository extends
JpaRepository<DataOrchestratorEntity, String> {
-
- @Query(value = "select * from DATAORCHESTRATOR_ENTITY s where
s.eventStatus = ?1 ORDER BY occurredTime DESC", nativeQuery = true)
- public List<DataOrchestratorEntity> findAllEntitiesWithGivenStatus(String
eventStatus);
-
-
-}
diff --git
a/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/EventStatus.java
b/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/EventStatus.java
deleted file mode 100644
index 24bafbe..0000000
---
a/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/EventStatus.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package org.apache.airavata.datalake.orchestrator.registry.persistance;
-
-public enum EventStatus {
- DATA_ORCH_RECEIVED,
- DISPATCHED_TO_WORFLOW_ENGING,
- DATA_ORCH_PROCESSED_AND_SKIPPED,
- MFT_CALLBACK_RECEIVED,
- COMPLETED,
- ERRORED,
-
-}
diff --git
a/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/DataOrchestratorEntity.java
b/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/entity/DataOrchestratorEntity.java
similarity index 84%
rename from
data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/DataOrchestratorEntity.java
rename to
data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/entity/DataOrchestratorEntity.java
index 562690e..d46372e 100644
---
a/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/DataOrchestratorEntity.java
+++
b/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/entity/DataOrchestratorEntity.java
@@ -1,4 +1,21 @@
-package org.apache.airavata.datalake.orchestrator.registry.persistance;
+/*
+ * 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.datalake.orchestrator.registry.persistance.entity;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
diff --git
a/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/entity/EventStatus.java
b/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/entity/EventStatus.java
new file mode 100644
index 0000000..0df50f3
--- /dev/null
+++
b/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/entity/EventStatus.java
@@ -0,0 +1,28 @@
+/*
+ * 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.datalake.orchestrator.registry.persistance.entity;
+
+public enum EventStatus {
+ DATA_ORCH_RECEIVED,
+ DISPATCHED_TO_WORFLOW_ENGING,
+ DATA_ORCH_PROCESSED_AND_SKIPPED,
+ MFT_CALLBACK_RECEIVED,
+ COMPLETED,
+ ERRORED,
+
+}
diff --git
a/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/WorkflowEntity.java
b/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/entity/WorkflowEntity.java
similarity index 73%
rename from
data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/WorkflowEntity.java
rename to
data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/entity/WorkflowEntity.java
index 1374d91..d585020 100644
---
a/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/WorkflowEntity.java
+++
b/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/entity/WorkflowEntity.java
@@ -1,4 +1,21 @@
-package org.apache.airavata.datalake.orchestrator.registry.persistance;
+/*
+ * 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.datalake.orchestrator.registry.persistance.entity;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
diff --git
a/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/WorkflowTaskEntity.java
b/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/entity/WorkflowTaskEntity.java
similarity index 69%
rename from
data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/WorkflowTaskEntity.java
rename to
data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/entity/WorkflowTaskEntity.java
index 82e1ac5..b20ddd8 100644
---
a/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/WorkflowTaskEntity.java
+++
b/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/entity/WorkflowTaskEntity.java
@@ -1,5 +1,23 @@
-package org.apache.airavata.datalake.orchestrator.registry.persistance;
+/*
+ * 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.datalake.orchestrator.registry.persistance.entity;
+import
org.apache.airavata.datalake.orchestrator.registry.persistance.entity.WorkflowEntity;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
diff --git
a/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/entity/parser/DataParserEntity.java
b/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/entity/parser/DataParserEntity.java
new file mode 100644
index 0000000..c425966
--- /dev/null
+++
b/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/entity/parser/DataParserEntity.java
@@ -0,0 +1,115 @@
+/*
+ * 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.datalake.orchestrator.registry.persistance.entity.parser;
+
+import javax.persistence.*;
+import java.util.Set;
+
+@Entity
+@Table(name = "DATA_PARSER_ENTITY")
+public class DataParserEntity {
+
+ @Id
+ @Column(name = "PARSER_ID")
+ private String parserId;
+
+ @Column(name = "NAME")
+ private String parserName;
+
+ @Column(name = "IMAGE")
+ private String dockerImage;
+
+ @Column(name = "EXEC_COMMAND")
+ private String execCommand;
+
+ @Column(name = "INPUT_PATH")
+ private String inputPath;
+
+ @Column(name = "OUTPUT_PATH")
+ private String outputPath;
+
+ @OneToMany(fetch = FetchType.EAGER, mappedBy = "parserEntity",
orphanRemoval = true, cascade = CascadeType.ALL)
+ private Set<DataParserInputInterfaceEntity> inputInterfacesList;
+
+ @OneToMany(fetch = FetchType.EAGER, mappedBy = "parserEntity",
orphanRemoval = true, cascade = CascadeType.ALL)
+ private Set<DataParserOutputInterfaceEntity> outputInterfacesList;
+
+ public String getParserId() {
+ return parserId;
+ }
+
+ public void setParserId(String parserId) {
+ this.parserId = parserId;
+ }
+
+ public String getParserName() {
+ return parserName;
+ }
+
+ public void setParserName(String parserName) {
+ this.parserName = parserName;
+ }
+
+ public String getDockerImage() {
+ return dockerImage;
+ }
+
+ public void setDockerImage(String dockerImage) {
+ this.dockerImage = dockerImage;
+ }
+
+ public String getExecCommand() {
+ return execCommand;
+ }
+
+ public void setExecCommand(String execCommand) {
+ this.execCommand = execCommand;
+ }
+
+ public String getInputPath() {
+ return inputPath;
+ }
+
+ public void setInputPath(String inputPath) {
+ this.inputPath = inputPath;
+ }
+
+ public String getOutputPath() {
+ return outputPath;
+ }
+
+ public void setOutputPath(String outputPath) {
+ this.outputPath = outputPath;
+ }
+
+ public Set<DataParserInputInterfaceEntity> getInputInterfacesList() {
+ return inputInterfacesList;
+ }
+
+ public void setInputInterfacesList(Set<DataParserInputInterfaceEntity>
inputInterfacesList) {
+ this.inputInterfacesList = inputInterfacesList;
+ }
+
+ public Set<DataParserOutputInterfaceEntity> getOutputInterfacesList() {
+ return outputInterfacesList;
+ }
+
+ public void setOutputInterfacesList(Set<DataParserOutputInterfaceEntity>
outputInterfacesList) {
+ this.outputInterfacesList = outputInterfacesList;
+ }
+}
diff --git
a/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/entity/parser/DataParserInputInterfaceEntity.java
b/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/entity/parser/DataParserInputInterfaceEntity.java
new file mode 100644
index 0000000..53696ab
--- /dev/null
+++
b/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/entity/parser/DataParserInputInterfaceEntity.java
@@ -0,0 +1,84 @@
+/*
+ * 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.datalake.orchestrator.registry.persistance.entity.parser;
+
+import
org.apache.airavata.datalake.orchestrator.registry.persistance.entity.parser.DataParserEntity;
+
+import javax.persistence.*;
+
+@Entity
+@Table(name = "DATA_PARSER_INPUT_INTERFACE_ENTITY")
+public class DataParserInputInterfaceEntity {
+
+ @Id
+ @Column(name = "INPUT_INTERFACE_ID")
+ private String parserInputInterfaceId;
+
+ @ManyToOne(fetch = FetchType.LAZY)
+ @JoinColumn(name = "PARSER_ID", insertable=false, updatable=false)
+ private DataParserEntity parserEntity;
+
+ @Column(name = "INPUT_TYPE")
+ private String inputType;
+
+ @Column(name = "INPUT_NAME")
+ private String inputName;
+
+ @Column(name = "PARSER_ID")
+ private String parserId;
+
+ public String getParserInputInterfaceId() {
+ return parserInputInterfaceId;
+ }
+
+ public void setParserInputInterfaceId(String parserInputInterfaceId) {
+ this.parserInputInterfaceId = parserInputInterfaceId;
+ }
+
+ public DataParserEntity getParserEntity() {
+ return parserEntity;
+ }
+
+ public void setParserEntity(DataParserEntity parserEntity) {
+ this.parserEntity = parserEntity;
+ }
+
+ public String getInputType() {
+ return inputType;
+ }
+
+ public void setInputType(String inputType) {
+ this.inputType = inputType;
+ }
+
+ public String getInputName() {
+ return inputName;
+ }
+
+ public void setInputName(String inputName) {
+ this.inputName = inputName;
+ }
+
+ public String getParserId() {
+ return parserId;
+ }
+
+ public void setParserId(String parserId) {
+ this.parserId = parserId;
+ }
+}
diff --git
a/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/entity/parser/DataParserOutputInterfaceEntity.java
b/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/entity/parser/DataParserOutputInterfaceEntity.java
new file mode 100644
index 0000000..cd5f0f0
--- /dev/null
+++
b/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/entity/parser/DataParserOutputInterfaceEntity.java
@@ -0,0 +1,84 @@
+/*
+ * 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.datalake.orchestrator.registry.persistance.entity.parser;
+
+import
org.apache.airavata.datalake.orchestrator.registry.persistance.entity.parser.DataParserEntity;
+
+import javax.persistence.*;
+
+@Entity
+@Table(name = "DATA_PARSER_OUTPUT_INTERFACE_ENTITY")
+public class DataParserOutputInterfaceEntity {
+
+ @Id
+ @Column(name = "OUTPUT_INTERFACE_ID")
+ private String parserOutputInterfaceId;
+
+ @ManyToOne(fetch = FetchType.LAZY)
+ @JoinColumn(name = "PARSER_ID", insertable=false, updatable=false)
+ private DataParserEntity parserEntity;
+
+ @Column(name = "OUTPUT_TYPE")
+ private String outputType;
+
+ @Column(name = "OUTPUT_NAME")
+ private String outputName;
+
+ @Column(name = "PARSER_ID")
+ private String parserId;
+
+ public String getParserOutputInterfaceId() {
+ return parserOutputInterfaceId;
+ }
+
+ public void setParserOutputInterfaceId(String parserOutputInterfaceId) {
+ this.parserOutputInterfaceId = parserOutputInterfaceId;
+ }
+
+ public DataParserEntity getParserEntity() {
+ return parserEntity;
+ }
+
+ public void setParserEntity(DataParserEntity parserEntity) {
+ this.parserEntity = parserEntity;
+ }
+
+ public String getOutputType() {
+ return outputType;
+ }
+
+ public void setOutputType(String outputType) {
+ this.outputType = outputType;
+ }
+
+ public String getOutputName() {
+ return outputName;
+ }
+
+ public void setOutputName(String outputName) {
+ this.outputName = outputName;
+ }
+
+ public String getParserId() {
+ return parserId;
+ }
+
+ public void setParserId(String parserId) {
+ this.parserId = parserId;
+ }
+}
diff --git
a/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/entity/parser/DataParsingJobEntity.java
b/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/entity/parser/DataParsingJobEntity.java
new file mode 100644
index 0000000..4df7c62
--- /dev/null
+++
b/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/entity/parser/DataParsingJobEntity.java
@@ -0,0 +1,83 @@
+/*
+ * 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.datalake.orchestrator.registry.persistance.entity.parser;
+
+import javax.persistence.*;
+import java.util.List;
+
+@Entity
+@Table(name = "DATA_PARSING_JOB_ENTITY")
+public class DataParsingJobEntity {
+
+ @Id
+ @Column(name = "DATA_PARSING_JOB_ID")
+ private String dataParsingJobId;
+
+ @Column(name = "PARSER_ID")
+ private String parserId;
+
+ @ManyToOne(fetch = FetchType.LAZY)
+ @JoinColumn(name = "PARSER_ID", insertable=false, updatable=false)
+ private DataParserEntity dataParserEntity;
+
+ @OneToMany(fetch = FetchType.LAZY, mappedBy = "dataParsingJobEntity",
orphanRemoval = true, cascade = CascadeType.ALL)
+ private List<DataParsingJobInputEntity> dataParsingJobInputsList;
+
+ @OneToMany(fetch = FetchType.LAZY, mappedBy = "dataParsingJobEntity",
orphanRemoval = true, cascade = CascadeType.ALL)
+ private List<DataParsingJobOutputEntity> dataParsingJobOutputsList;
+
+ public String getDataParsingJobId() {
+ return dataParsingJobId;
+ }
+
+ public void setDataParsingJobId(String dataParsingJobId) {
+ this.dataParsingJobId = dataParsingJobId;
+ }
+
+ public String getParserId() {
+ return parserId;
+ }
+
+ public void setParserId(String parserId) {
+ this.parserId = parserId;
+ }
+
+ public DataParserEntity getDataParserEntity() {
+ return dataParserEntity;
+ }
+
+ public void setDataParserEntity(DataParserEntity dataParserEntity) {
+ this.dataParserEntity = dataParserEntity;
+ }
+
+ public List<DataParsingJobInputEntity> getDataParsingJobInputsList() {
+ return dataParsingJobInputsList;
+ }
+
+ public void setDataParsingJobInputsList(List<DataParsingJobInputEntity>
dataParsingJobInputsList) {
+ this.dataParsingJobInputsList = dataParsingJobInputsList;
+ }
+
+ public List<DataParsingJobOutputEntity> getDataParsingJobOutputsList() {
+ return dataParsingJobOutputsList;
+ }
+
+ public void setDataParsingJobOutputsList(List<DataParsingJobOutputEntity>
dataParsingJobOutputsList) {
+ this.dataParsingJobOutputsList = dataParsingJobOutputsList;
+ }
+}
diff --git
a/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/entity/parser/DataParsingJobInputEntity.java
b/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/entity/parser/DataParsingJobInputEntity.java
new file mode 100644
index 0000000..3a19862
--- /dev/null
+++
b/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/entity/parser/DataParsingJobInputEntity.java
@@ -0,0 +1,94 @@
+/*
+ * 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.datalake.orchestrator.registry.persistance.entity.parser;
+
+import javax.persistence.*;
+
+@Entity
+@Table(name = "DATA_PARSING_JOB_INPUT_ENTITY")
+public class DataParsingJobInputEntity {
+
+ @Id
+ @Column(name = "DATA_PARSING_JOB_INPUT_ID")
+ private String id;
+
+ @Column(name = "DATA_PARSER_INPUT_INTERFACE_ID")
+ private String dataParserInputInterfaceId;
+
+ @Column(name = "DATA_PARSING_JOB_ID")
+ private String dataParsingJobId;
+
+ @Column(name = "SELECTION_QUERY")
+ private String selectionQuery;
+
+ @ManyToOne(fetch = FetchType.LAZY)
+ @JoinColumn(name = "DATA_PARSER_INPUT_INTERFACE_ID", insertable=false,
updatable=false)
+ private DataParserInputInterfaceEntity dataParserInputInterface;
+
+ @ManyToOne(fetch = FetchType.LAZY)
+ @JoinColumn(name = "DATA_PARSING_JOB_ID", insertable=false,
updatable=false)
+ private DataParsingJobEntity dataParsingJobEntity;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getDataParserInputInterfaceId() {
+ return dataParserInputInterfaceId;
+ }
+
+ public void setDataParserInputInterfaceId(String
dataParserInputInterfaceId) {
+ this.dataParserInputInterfaceId = dataParserInputInterfaceId;
+ }
+
+ public String getDataParsingJobId() {
+ return dataParsingJobId;
+ }
+
+ public void setDataParsingJobId(String dataParsingJobId) {
+ this.dataParsingJobId = dataParsingJobId;
+ }
+
+ public String getSelectionQuery() {
+ return selectionQuery;
+ }
+
+ public void setSelectionQuery(String selectionQuery) {
+ this.selectionQuery = selectionQuery;
+ }
+
+ public DataParserInputInterfaceEntity getDataParserInputInterface() {
+ return dataParserInputInterface;
+ }
+
+ public void setDataParserInputInterface(DataParserInputInterfaceEntity
dataParserInputInterface) {
+ this.dataParserInputInterface = dataParserInputInterface;
+ }
+
+ public DataParsingJobEntity getDataParsingJobEntity() {
+ return dataParsingJobEntity;
+ }
+
+ public void setDataParsingJobEntity(DataParsingJobEntity
dataParsingJobEntity) {
+ this.dataParsingJobEntity = dataParsingJobEntity;
+ }
+}
diff --git
a/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/entity/parser/DataParsingJobOutputEntity.java
b/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/entity/parser/DataParsingJobOutputEntity.java
new file mode 100644
index 0000000..27aa4fd
--- /dev/null
+++
b/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/entity/parser/DataParsingJobOutputEntity.java
@@ -0,0 +1,94 @@
+/*
+ * 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.datalake.orchestrator.registry.persistance.entity.parser;
+
+import javax.persistence.*;
+
+@Entity
+@Table(name = "DATA_PARSING_JOB_OUTPUT_ENTITY")
+public class DataParsingJobOutputEntity {
+
+ @Id
+ @Column(name = "DATA_PARSING_JOB_OUTPUT_ID")
+ private String id;
+
+ @Column(name = "DATA_PARSER_OUTPUT_INTERFACE_ID")
+ private String dataParserOutputInterfaceId;
+
+ @Column(name = "DATA_PARSING_JOB_ID")
+ private String dataParsingJobId;
+
+ @Column(name = "OUTPUT_TYPE")
+ private DataParsingJobOutputType outputType;
+
+ @ManyToOne(fetch = FetchType.LAZY)
+ @JoinColumn(name = "DATA_PARSER_OUTPUT_INTERFACE_ID", insertable=false,
updatable=false)
+ private DataParserOutputInterfaceEntity dataParserOutputInterface;
+
+ @ManyToOne(fetch = FetchType.LAZY)
+ @JoinColumn(name = "DATA_PARSING_JOB_ID", insertable=false,
updatable=false)
+ private DataParsingJobEntity dataParsingJobEntity;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getDataParserOutputInterfaceId() {
+ return dataParserOutputInterfaceId;
+ }
+
+ public void setDataParserOutputInterfaceId(String
dataParserOutputInterfaceId) {
+ this.dataParserOutputInterfaceId = dataParserOutputInterfaceId;
+ }
+
+ public String getDataParsingJobId() {
+ return dataParsingJobId;
+ }
+
+ public void setDataParsingJobId(String dataParsingJobId) {
+ this.dataParsingJobId = dataParsingJobId;
+ }
+
+ public DataParsingJobOutputType getOutputType() {
+ return outputType;
+ }
+
+ public void setOutputType(DataParsingJobOutputType outputType) {
+ this.outputType = outputType;
+ }
+
+ public DataParserOutputInterfaceEntity getDataParserOutputInterface() {
+ return dataParserOutputInterface;
+ }
+
+ public void setDataParserOutputInterface(DataParserOutputInterfaceEntity
dataParserOutputInterface) {
+ this.dataParserOutputInterface = dataParserOutputInterface;
+ }
+
+ public DataParsingJobEntity getDataParsingJobEntity() {
+ return dataParsingJobEntity;
+ }
+
+ public void setDataParsingJobEntity(DataParsingJobEntity
dataParsingJobEntity) {
+ this.dataParsingJobEntity = dataParsingJobEntity;
+ }
+}
diff --git
a/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/entity/parser/DataParsingJobOutputType.java
b/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/entity/parser/DataParsingJobOutputType.java
new file mode 100644
index 0000000..51536b7
--- /dev/null
+++
b/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/entity/parser/DataParsingJobOutputType.java
@@ -0,0 +1,24 @@
+/*
+ * 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.datalake.orchestrator.registry.persistance.entity.parser;
+
+public enum DataParsingJobOutputType {
+ RAW_FILE,
+ JSON,
+ XML
+}
diff --git
a/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/repository/DataOrchestratorEventRepository.java
b/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/repository/DataOrchestratorEventRepository.java
new file mode 100644
index 0000000..43f2eb9
--- /dev/null
+++
b/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/repository/DataOrchestratorEventRepository.java
@@ -0,0 +1,32 @@
+/*
+ * 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.datalake.orchestrator.registry.persistance.repository;
+
+import
org.apache.airavata.datalake.orchestrator.registry.persistance.entity.DataOrchestratorEntity;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.Query;
+
+import java.util.List;
+
+public interface DataOrchestratorEventRepository extends
JpaRepository<DataOrchestratorEntity, String> {
+
+ @Query(value = "select * from DATAORCHESTRATOR_ENTITY s where
s.eventStatus = ?1 ORDER BY occurredTime DESC", nativeQuery = true)
+ public List<DataOrchestratorEntity> findAllEntitiesWithGivenStatus(String
eventStatus);
+
+
+}
diff --git
a/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/repository/DataParserEntityRepository.java
b/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/repository/DataParserEntityRepository.java
new file mode 100644
index 0000000..ebe81d3
--- /dev/null
+++
b/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/repository/DataParserEntityRepository.java
@@ -0,0 +1,25 @@
+/*
+ * 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.datalake.orchestrator.registry.persistance.repository;
+
+import
org.apache.airavata.datalake.orchestrator.registry.persistance.entity.parser.DataParserEntity;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+public interface DataParserEntityRepository extends
JpaRepository<DataParserEntity, String> {
+
+}
diff --git
a/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/repository/DataParserInputInterfaceEntityRepository.java
b/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/repository/DataParserInputInterfaceEntityRepository.java
new file mode 100644
index 0000000..6724548
--- /dev/null
+++
b/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/repository/DataParserInputInterfaceEntityRepository.java
@@ -0,0 +1,24 @@
+/*
+ * 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.datalake.orchestrator.registry.persistance.repository;
+
+import
org.apache.airavata.datalake.orchestrator.registry.persistance.entity.parser.DataParserInputInterfaceEntity;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+public interface DataParserInputInterfaceEntityRepository extends
JpaRepository<DataParserInputInterfaceEntity, String> {
+}
diff --git
a/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/repository/DataParserOutputInterfaceEntityRepository.java
b/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/repository/DataParserOutputInterfaceEntityRepository.java
new file mode 100644
index 0000000..33685ab
--- /dev/null
+++
b/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/repository/DataParserOutputInterfaceEntityRepository.java
@@ -0,0 +1,24 @@
+/*
+ * 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.datalake.orchestrator.registry.persistance.repository;
+
+import
org.apache.airavata.datalake.orchestrator.registry.persistance.entity.parser.DataParserOutputInterfaceEntity;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+public interface DataParserOutputInterfaceEntityRepository extends
JpaRepository<DataParserOutputInterfaceEntity, String> {
+}
diff --git
a/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/repository/DataParsingJobEntityRepository.java
b/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/repository/DataParsingJobEntityRepository.java
new file mode 100644
index 0000000..e7f490e
--- /dev/null
+++
b/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/repository/DataParsingJobEntityRepository.java
@@ -0,0 +1,24 @@
+/*
+ * 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.datalake.orchestrator.registry.persistance.repository;
+
+import
org.apache.airavata.datalake.orchestrator.registry.persistance.entity.parser.DataParsingJobEntity;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+public interface DataParsingJobEntityRepository extends
JpaRepository<DataParsingJobEntity, String> {
+}
diff --git
a/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/WorkflowEntityRepository.java
b/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/repository/WorkflowEntityRepository.java
similarity index 66%
rename from
data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/WorkflowEntityRepository.java
rename to
data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/repository/WorkflowEntityRepository.java
index f48bef5..4014186 100644
---
a/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/WorkflowEntityRepository.java
+++
b/data-orchestrator/data-orchestrator-registry/src/main/java/org/apache/airavata/datalake/orchestrator/registry/persistance/repository/WorkflowEntityRepository.java
@@ -1,5 +1,6 @@
-package org.apache.airavata.datalake.orchestrator.registry.persistance;
+package
org.apache.airavata.datalake.orchestrator.registry.persistance.repository;
+import
org.apache.airavata.datalake.orchestrator.registry.persistance.entity.WorkflowEntity;
import org.springframework.data.jpa.repository.JpaRepository;
public interface WorkflowEntityRepository extends
JpaRepository<WorkflowEntity, String> {
diff --git
a/data-orchestrator/data-orchestrator-service/data-orchestrator-api-server/pom.xml
b/data-orchestrator/data-orchestrator-service/data-orchestrator-api-server/pom.xml
index 70f5c71..c7e5291 100644
---
a/data-orchestrator/data-orchestrator-service/data-orchestrator-api-server/pom.xml
+++
b/data-orchestrator/data-orchestrator-service/data-orchestrator-api-server/pom.xml
@@ -120,15 +120,19 @@
<dependency>
<groupId>org.apache.airavata.data.lake</groupId>
<artifactId>drms-stubs</artifactId>
- <version>0.01-SNAPSHOT</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.airavata.data.lake</groupId>
<artifactId>drms-stubs</artifactId>
- <version>0.01-SNAPSHOT</version>
+ <version>${project.version}</version>
<scope>compile</scope>
</dependency>
-
+ <dependency>
+ <groupId>org.apache.airavata.data.lake</groupId>
+ <artifactId>data-orchestrator-api-stub</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>org.apache.airavata</groupId>
<artifactId>mft-api-client</artifactId>
diff --git
a/data-orchestrator/data-orchestrator-service/data-orchestrator-api-server/src/main/java/org/apache/airavata/datalake/orchestrator/APIServerInitializer.java
b/data-orchestrator/data-orchestrator-service/data-orchestrator-api-server/src/main/java/org/apache/airavata/datalake/orchestrator/APIServerInitializer.java
index 8885f6c..e687e1f 100644
---
a/data-orchestrator/data-orchestrator-service/data-orchestrator-api-server/src/main/java/org/apache/airavata/datalake/orchestrator/APIServerInitializer.java
+++
b/data-orchestrator/data-orchestrator-service/data-orchestrator-api-server/src/main/java/org/apache/airavata/datalake/orchestrator/APIServerInitializer.java
@@ -19,7 +19,7 @@
*/
package org.apache.airavata.datalake.orchestrator;
-import
org.apache.airavata.datalake.orchestrator.handlers.OrchestratorEventHandler;
+import
org.apache.airavata.datalake.orchestrator.handlers.async.OrchestratorEventHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -34,7 +34,6 @@ import org.yaml.snakeyaml.Yaml;
import java.io.FileInputStream;
import java.io.InputStream;
-import java.util.Optional;
/**
* TODO: Spring Boot API
diff --git
a/data-orchestrator/data-orchestrator-service/data-orchestrator-api-server/src/main/java/org/apache/airavata/datalake/orchestrator/OrchClient.java
b/data-orchestrator/data-orchestrator-service/data-orchestrator-api-server/src/main/java/org/apache/airavata/datalake/orchestrator/OrchClient.java
new file mode 100644
index 0000000..2890dfe
--- /dev/null
+++
b/data-orchestrator/data-orchestrator-service/data-orchestrator-api-server/src/main/java/org/apache/airavata/datalake/orchestrator/OrchClient.java
@@ -0,0 +1,91 @@
+package org.apache.airavata.datalake.orchestrator;
+
+import io.grpc.ManagedChannel;
+import io.grpc.ManagedChannelBuilder;
+import org.apache.airavata.datalake.data.orchestrator.api.stub.parsing.*;
+import
org.apache.airavata.datalake.orchestrator.registry.persistance.entity.parser.DataParsingJobInputEntity;
+import org.dozer.DozerBeanMapper;
+
+import javax.script.*;
+import java.io.File;
+import java.util.UUID;
+import java.util.function.Predicate;
+
+public class OrchClient {
+ public static void main(String are[]) throws ScriptException {
+ /*DozerBeanMapper mapper = new DozerBeanMapper();
+
+ DataParsingJobInputEntity dpe = new DataParsingJobInputEntity();
+ dpe.setId("id");
+ dpe.setDataParsingJobId("dpj");
+ dpe.setDataParserInputInterfaceId("dpie");
+ dpe.setSelectionQuery("query");
+
+ DataParsingJobInput.Builder builder = DataParsingJobInput.newBuilder();
+
+ mapper.map(dpe, builder);
+ System.out.println(builder.build());*/
+ ManagedChannel channel = ManagedChannelBuilder.forAddress("localhost",
6565).usePlaintext().build();
+ DataParserServiceGrpc.DataParserServiceBlockingStub parserClient =
DataParserServiceGrpc.newBlockingStub(channel);
+
+ ParsingJobListResponse parsingJobListResponse =
parserClient.listParsingJobs(ParsingJobListRequest.newBuilder().build());
+ System.out.println(parsingJobListResponse);
+ /*String parserId = UUID.randomUUID().toString();
+ ParserRegisterResponse parserRegisterResponse =
parserClient.registerParser(ParserRegisterRequest.newBuilder()
+ .setParser(DataParser.newBuilder()
+ .setParserId(parserId)
+ .setParserName("DM3 Parser")
+ .setDockerImage("dimuthuupe/dm3-parser:1.0")
+ .setExecCommand("python ./parser.py")
+ .setInputPath("/opt/inputs")
+ .setOutputPath("/opt/outputs")
+
.addInputInterfaces(DataParserInputInterface.newBuilder()
+ .setParserId(parserId)
+
.setParserInputInterfaceId(UUID.randomUUID().toString())
+ .setInputType("FILE")
+ .setInputName("input.dm3").build())
+
.addOutputInterfaces(DataParserOutputInterface.newBuilder()
+ .setParserId(parserId)
+
.setParserOutputInterfaceId(UUID.randomUUID().toString())
+ .setOutputType("FILE")
+ .setOutputName("derrived-metadata.json")
+ .build())
+
.addOutputInterfaces(DataParserOutputInterface.newBuilder()
+ .setParserId(parserId)
+
.setParserOutputInterfaceId(UUID.randomUUID().toString())
+ .setOutputType("FILE")
+ .setOutputName("img.jpeg").build())
+ .build()).build());
+
+ System.out.println(parserRegisterResponse.getParserId());
+
+
+ ParserListResponse parserListResponse =
parserClient.listParsers(ParserListRequest.newBuilder().build());
+ System.out.println(parserListResponse);
+
+ String parsingJobId = UUID.randomUUID().toString();
+ ParsingJobRegisterRequest.Builder parsingJob =
ParsingJobRegisterRequest.newBuilder().setParsingJob(DataParsingJob.newBuilder()
+ .setDataParsingJobId(parsingJobId)
+ .setParserId("2f48d838-d0e4-4413-8d8e-4579d4a7369d")
+ .addDataParsingJobInputs(DataParsingJobInput.newBuilder()
+ .setId(UUID.randomUUID().toString())
+
.setDataParserInputInterfaceId("dbb221fc-96d1-4aaf-ae85-73d6215a5106")
+ .setDataParsingJobId(parsingJobId)
+ .setSelectionQuery("EXTENSION == dm3").build())
+ .addDataParsingJobOutputs(DataParsingJobOutput.newBuilder()
+ .setId(UUID.randomUUID().toString())
+ .setDataParsingJobId(parsingJobId)
+ .setOutputType("JSON")
+
.setDataParserOutputInterfaceId("d1ded2cc-ffe6-4e47-a5a2-bdb782b62359").build()).build());
+ ParsingJobRegisterResponse parsingJobRegisterResponse =
parserClient.registerParsingJob(parsingJob.build()); */
+
+ /*File f = new File("/tmp/a.dm3");
+
+ ScriptEngine engine = new
ScriptEngineManager().getEngineByName("JavaScript");
+ Bindings bindings = engine.getBindings(ScriptContext.ENGINE_SCOPE);
+ bindings.put("polyglot.js.allowHostAccess", true);
+ bindings.put("polyglot.js.allowHostClassLookup", (Predicate<String>) s
-> true);
+ bindings.put("inputFile", f);
+
System.out.println(engine.eval("inputFile.getName().endsWith(\".dm3\");")); //
it will not work without allowHostAccess and allowHostClassLookup*/
+ }
+ }
diff --git
a/data-orchestrator/data-orchestrator-service/data-orchestrator-api-server/src/main/java/org/apache/airavata/datalake/orchestrator/connectors/DRMSConnector.java
b/data-orchestrator/data-orchestrator-service/data-orchestrator-api-server/src/main/java/org/apache/airavata/datalake/orchestrator/connectors/DRMSConnector.java
index d1513a7..368bd3b 100644
---
a/data-orchestrator/data-orchestrator-service/data-orchestrator-api-server/src/main/java/org/apache/airavata/datalake/orchestrator/connectors/DRMSConnector.java
+++
b/data-orchestrator/data-orchestrator-service/data-orchestrator-api-server/src/main/java/org/apache/airavata/datalake/orchestrator/connectors/DRMSConnector.java
@@ -9,9 +9,9 @@ import
org.apache.airavata.datalake.drms.resource.GenericResource;
import org.apache.airavata.datalake.drms.storage.*;
import org.apache.airavata.datalake.orchestrator.Configuration;
import
org.apache.airavata.datalake.orchestrator.core.connector.AbstractConnector;
-import
org.apache.airavata.datalake.orchestrator.registry.persistance.DataOrchestratorEntity;
-import
org.apache.airavata.datalake.orchestrator.registry.persistance.DataOrchestratorEventRepository;
-import
org.apache.airavata.datalake.orchestrator.registry.persistance.EventStatus;
+import
org.apache.airavata.datalake.orchestrator.registry.persistance.entity.DataOrchestratorEntity;
+import
org.apache.airavata.datalake.orchestrator.registry.persistance.repository.DataOrchestratorEventRepository;
+import
org.apache.airavata.datalake.orchestrator.registry.persistance.entity.EventStatus;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git
a/data-orchestrator/data-orchestrator-service/data-orchestrator-api-server/src/main/java/org/apache/airavata/datalake/orchestrator/handlers/OrchestratorEventHandler.java
b/data-orchestrator/data-orchestrator-service/data-orchestrator-api-server/src/main/java/org/apache/airavata/datalake/orchestrator/handlers/async/OrchestratorEventHandler.java
similarity index 74%
rename from
data-orchestrator/data-orchestrator-service/data-orchestrator-api-server/src/main/java/org/apache/airavata/datalake/orchestrator/handlers/OrchestratorEventHandler.java
rename to
data-orchestrator/data-orchestrator-service/data-orchestrator-api-server/src/main/java/org/apache/airavata/datalake/orchestrator/handlers/async/OrchestratorEventHandler.java
index 2c5600e..ff5fa67 100644
---
a/data-orchestrator/data-orchestrator-service/data-orchestrator-api-server/src/main/java/org/apache/airavata/datalake/orchestrator/handlers/OrchestratorEventHandler.java
+++
b/data-orchestrator/data-orchestrator-service/data-orchestrator-api-server/src/main/java/org/apache/airavata/datalake/orchestrator/handlers/async/OrchestratorEventHandler.java
@@ -1,9 +1,26 @@
-package org.apache.airavata.datalake.orchestrator.handlers;
+/*
+ * 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.datalake.orchestrator.handlers.async;
import org.apache.airavata.datalake.orchestrator.Configuration;
import
org.apache.airavata.datalake.orchestrator.processor.InboundEventProcessor;
import
org.apache.airavata.datalake.orchestrator.processor.OutboundEventProcessor;
-import
org.apache.airavata.datalake.orchestrator.registry.persistance.DataOrchestratorEventRepository;
+import
org.apache.airavata.datalake.orchestrator.registry.persistance.repository.DataOrchestratorEventRepository;
import org.apache.airavata.dataorchestrator.messaging.consumer.MessageConsumer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git
a/data-orchestrator/data-orchestrator-service/data-orchestrator-api-server/src/main/java/org/apache/airavata/datalake/orchestrator/handlers/grpc/DataParserApiHandler.java
b/data-orchestrator/data-orchestrator-service/data-orchestrator-api-server/src/main/java/org/apache/airavata/datalake/orchestrator/handlers/grpc/DataParserApiHandler.java
new file mode 100644
index 0000000..425cc96
--- /dev/null
+++
b/data-orchestrator/data-orchestrator-service/data-orchestrator-api-server/src/main/java/org/apache/airavata/datalake/orchestrator/handlers/grpc/DataParserApiHandler.java
@@ -0,0 +1,118 @@
+/*
+ * 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.datalake.orchestrator.handlers.grpc;
+
+import io.grpc.stub.StreamObserver;
+import org.apache.airavata.datalake.data.orchestrator.api.stub.parsing.*;
+import
org.apache.airavata.datalake.orchestrator.registry.persistance.entity.parser.DataParserEntity;
+import
org.apache.airavata.datalake.orchestrator.registry.persistance.entity.parser.DataParsingJobEntity;
+import
org.apache.airavata.datalake.orchestrator.registry.persistance.repository.DataParserEntityRepository;
+import
org.apache.airavata.datalake.orchestrator.registry.persistance.repository.DataParsingJobEntityRepository;
+import org.dozer.DozerBeanMapper;
+import org.lognet.springboot.grpc.GRpcService;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import java.util.List;
+
+@GRpcService
+public class DataParserApiHandler extends
DataParserServiceGrpc.DataParserServiceImplBase {
+
+ @Autowired
+ private DataParserEntityRepository parserRepo;
+
+ @Autowired
+ private DataParsingJobEntityRepository parsingJobRepo;
+
+
+ @Override
+ public void registerParser(ParserRegisterRequest request,
StreamObserver<ParserRegisterResponse> responseObserver) {
+ DozerBeanMapper mapper = new DozerBeanMapper();
+ DataParserEntity entity = mapper.map(request.getParser(),
DataParserEntity.class);
+ DataParserEntity saved = parserRepo.save(entity);
+
responseObserver.onNext(ParserRegisterResponse.newBuilder().setParserId(saved.getParserId()).build());
+ responseObserver.onCompleted();
+ }
+
+ @Override
+ public void listParsers(ParserListRequest request,
StreamObserver<ParserListResponse> responseObserver) {
+ DozerBeanMapper mapper = new DozerBeanMapper();
+
+ ParserListResponse.Builder response = ParserListResponse.newBuilder();
+
+ List<DataParserEntity> allParsers = parserRepo.findAll();
+ allParsers.forEach(dataParserEntity -> {
+ DataParser.Builder parserBuilder = DataParser.newBuilder();
+ mapper.map(dataParserEntity, parserBuilder);
+
dataParserEntity.getInputInterfacesList().forEach(dataParserInputInterfaceEntity
-> {
+ DataParserInputInterface.Builder inputBuilder =
DataParserInputInterface.newBuilder();
+ mapper.map(dataParserInputInterfaceEntity, inputBuilder);
+ parserBuilder.addInputInterfaces(inputBuilder);
+ });
+
+
dataParserEntity.getOutputInterfacesList().forEach(dataParserOutputInterfaceEntity
-> {
+ DataParserOutputInterface.Builder outputBuilder =
DataParserOutputInterface.newBuilder();
+ mapper.map(dataParserOutputInterfaceEntity, outputBuilder);
+ parserBuilder.addOutputInterfaces(outputBuilder);
+ });
+ response.addParsers(parserBuilder);
+ });
+
+ responseObserver.onNext(response.build());
+ responseObserver.onCompleted();
+ }
+
+ @Override
+ public void registerParsingJob(ParsingJobRegisterRequest request,
StreamObserver<ParsingJobRegisterResponse> responseObserver) {
+ DozerBeanMapper mapper = new DozerBeanMapper();
+ DataParsingJobEntity entity = mapper.map(request.getParsingJob(),
DataParsingJobEntity.class);
+ DataParsingJobEntity savedEntity = parsingJobRepo.save(entity);
+
responseObserver.onNext(ParsingJobRegisterResponse.newBuilder().setParsingJobId(savedEntity.getDataParsingJobId()).build());
+ responseObserver.onCompleted();
+ }
+
+ @Override
+ public void listParsingJobs(ParsingJobListRequest request,
StreamObserver<ParsingJobListResponse> responseObserver) {
+
+ DozerBeanMapper mapper = new DozerBeanMapper();
+
+ ParsingJobListResponse.Builder listBuilder =
ParsingJobListResponse.newBuilder();
+
+ List<DataParsingJobEntity> allParsingJobEntities =
parsingJobRepo.findAll();
+ allParsingJobEntities.forEach(dataParsingJobEntity -> {
+ DataParsingJob.Builder parsingJobBuilder =
DataParsingJob.newBuilder();
+ mapper.map(dataParsingJobEntity, parsingJobBuilder);
+
+
dataParsingJobEntity.getDataParsingJobInputsList().forEach(dataParsingJobInputEntity
-> {
+ DataParsingJobInput.Builder inputBuilder =
DataParsingJobInput.newBuilder();
+ mapper.map(dataParsingJobInputEntity, inputBuilder);
+ parsingJobBuilder.addDataParsingJobInputs(inputBuilder);
+ });
+
+
dataParsingJobEntity.getDataParsingJobOutputsList().forEach(dataParsingJobOutputEntity
-> {
+ DataParsingJobOutput.Builder outputBuilder =
DataParsingJobOutput.newBuilder();
+ mapper.map(dataParsingJobOutputEntity, outputBuilder);
+ parsingJobBuilder.addDataParsingJobOutputs(outputBuilder);
+ });
+
+ listBuilder.addParsers(parsingJobBuilder);
+ });
+
+ responseObserver.onNext(listBuilder.build());
+ responseObserver.onCompleted();
+ }
+}
diff --git
a/data-orchestrator/data-orchestrator-service/data-orchestrator-api-server/src/main/java/org/apache/airavata/datalake/orchestrator/processor/InboundEventProcessor.java
b/data-orchestrator/data-orchestrator-service/data-orchestrator-api-server/src/main/java/org/apache/airavata/datalake/orchestrator/processor/InboundEventProcessor.java
index faddd61..83d9ada 100644
---
a/data-orchestrator/data-orchestrator-service/data-orchestrator-api-server/src/main/java/org/apache/airavata/datalake/orchestrator/processor/InboundEventProcessor.java
+++
b/data-orchestrator/data-orchestrator-service/data-orchestrator-api-server/src/main/java/org/apache/airavata/datalake/orchestrator/processor/InboundEventProcessor.java
@@ -3,9 +3,9 @@ package org.apache.airavata.datalake.orchestrator.processor;
import org.apache.airavata.datalake.orchestrator.Configuration;
import org.apache.airavata.datalake.orchestrator.Utils;
import
org.apache.airavata.datalake.orchestrator.core.processor.MessageProcessor;
-import
org.apache.airavata.datalake.orchestrator.registry.persistance.DataOrchestratorEntity;
-import
org.apache.airavata.datalake.orchestrator.registry.persistance.DataOrchestratorEventRepository;
-import
org.apache.airavata.datalake.orchestrator.registry.persistance.EventStatus;
+import
org.apache.airavata.datalake.orchestrator.registry.persistance.entity.DataOrchestratorEntity;
+import
org.apache.airavata.datalake.orchestrator.registry.persistance.repository.DataOrchestratorEventRepository;
+import
org.apache.airavata.datalake.orchestrator.registry.persistance.entity.EventStatus;
import org.apache.airavata.dataorchestrator.messaging.model.NotificationEvent;
import org.dozer.DozerBeanMapper;
import org.dozer.loader.api.BeanMappingBuilder;
diff --git
a/data-orchestrator/data-orchestrator-service/data-orchestrator-api-server/src/main/java/org/apache/airavata/datalake/orchestrator/processor/OutboundEventProcessor.java
b/data-orchestrator/data-orchestrator-service/data-orchestrator-api-server/src/main/java/org/apache/airavata/datalake/orchestrator/processor/OutboundEventProcessor.java
index dbf330b..ba1a07c 100644
---
a/data-orchestrator/data-orchestrator-service/data-orchestrator-api-server/src/main/java/org/apache/airavata/datalake/orchestrator/processor/OutboundEventProcessor.java
+++
b/data-orchestrator/data-orchestrator-service/data-orchestrator-api-server/src/main/java/org/apache/airavata/datalake/orchestrator/processor/OutboundEventProcessor.java
@@ -8,9 +8,9 @@ import org.apache.airavata.datalake.orchestrator.Utils;
import org.apache.airavata.datalake.orchestrator.connectors.DRMSConnector;
import
org.apache.airavata.datalake.orchestrator.connectors.WorkflowServiceConnector;
import
org.apache.airavata.datalake.orchestrator.core.processor.MessageProcessor;
-import
org.apache.airavata.datalake.orchestrator.registry.persistance.DataOrchestratorEntity;
-import
org.apache.airavata.datalake.orchestrator.registry.persistance.DataOrchestratorEventRepository;
-import
org.apache.airavata.datalake.orchestrator.registry.persistance.EventStatus;
+import
org.apache.airavata.datalake.orchestrator.registry.persistance.entity.DataOrchestratorEntity;
+import
org.apache.airavata.datalake.orchestrator.registry.persistance.repository.DataOrchestratorEventRepository;
+import
org.apache.airavata.datalake.orchestrator.registry.persistance.entity.EventStatus;
import org.apache.airavata.dataorchestrator.messaging.model.NotificationEvent;
import org.dozer.DozerBeanMapper;
import org.dozer.loader.api.BeanMappingBuilder;
diff --git
a/data-orchestrator/data-orchestrator-service/data-orchestrator-api-stub/pom.xml
b/data-orchestrator/data-orchestrator-service/data-orchestrator-api-stub/pom.xml
new file mode 100644
index 0000000..bc1a597
--- /dev/null
+++
b/data-orchestrator/data-orchestrator-service/data-orchestrator-api-stub/pom.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <artifactId>data-orchestrator-service</artifactId>
+ <groupId>org.apache.airavata.data.lake</groupId>
+ <version>0.01-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>data-orchestrator-api-stub</artifactId>
+
+ <properties>
+ <maven.compiler.source>11</maven.compiler.source>
+ <maven.compiler.target>11</maven.compiler.target>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.google.protobuf</groupId>
+ <artifactId>protobuf-java</artifactId>
+ <version>${protobuf.java}</version>
+ </dependency>
+ <dependency>
+ <groupId>io.grpc</groupId>
+ <artifactId>grpc-stub</artifactId>
+ <version>${io.grpc.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>io.grpc</groupId>
+ <artifactId>grpc-protobuf</artifactId>
+ <version>${io.grpc.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>io.grpc</groupId>
+ <artifactId>grpc-netty</artifactId>
+ <version>${io.grpc.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.annotation</groupId>
+ <artifactId>javax.annotation-api</artifactId>
+ <version>${javax.annotation.version}</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <extensions>
+ <extension>
+ <groupId>kr.motd.maven</groupId>
+ <artifactId>os-maven-plugin</artifactId>
+ <version>${os.maven.plugin}</version>
+ </extension>
+ </extensions>
+ <plugins>
+ <plugin>
+ <groupId>org.xolstice.maven.plugins</groupId>
+ <artifactId>protobuf-maven-plugin</artifactId>
+ <version>${protobuf.maven.plugin}</version>
+ <configuration>
+
<protocArtifact>com.google.protobuf:protoc:3.0.2:exe:${os.detected.classifier}</protocArtifact>
+ <pluginId>grpc-java</pluginId>
+
<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.0.1:exe:${os.detected.classifier}</pluginArtifact>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>compile</goal>
+ <goal>compile-custom</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
\ No newline at end of file
diff --git
a/data-orchestrator/data-orchestrator-service/data-orchestrator-api-stub/src/main/proto/parsing.proto
b/data-orchestrator/data-orchestrator-service/data-orchestrator-api-stub/src/main/proto/parsing.proto
new file mode 100644
index 0000000..635e261
--- /dev/null
+++
b/data-orchestrator/data-orchestrator-service/data-orchestrator-api-stub/src/main/proto/parsing.proto
@@ -0,0 +1,120 @@
+/*
+ * 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.
+ */
+
+syntax = "proto3";
+
+option java_multiple_files = true;
+package org.apache.airavata.datalake.data.orchestrator.api.stub.parsing;
+
+import "google/api/annotations.proto";
+import "google/protobuf/empty.proto";
+
+message DataParserInputInterface {
+ string parserInputInterfaceId = 1;
+ string inputType = 2;
+ string inputName = 3;
+ string parserId = 4;
+}
+
+message DataParserOutputInterface {
+ string parserOutputInterfaceId = 1;
+ string outputType = 2;
+ string outputName = 3;
+ string parserId = 4;
+}
+
+message DataParser {
+ string parserId = 1;
+ string parserName = 2;
+ string dockerImage = 3;
+ string execCommand = 4;
+ string inputPath = 5;
+ string outputPath = 6;
+ repeated DataParserInputInterface inputInterfaces = 7;
+ repeated DataParserOutputInterface outputInterfaces = 8;
+}
+
+message DataParsingJobInput {
+ string id = 1;
+ string dataParserInputInterfaceId = 2;
+ string dataParsingJobId = 3;
+ string selectionQuery = 4;
+}
+
+message DataParsingJobOutput {
+ string id = 1;
+ string dataParserOutputInterfaceId = 2;
+ string dataParsingJobId = 3;
+ string outputType = 4;
+}
+
+message DataParsingJob {
+ string dataParsingJobId = 1;
+ string parserId = 2;
+ repeated DataParsingJobInput dataParsingJobInputs = 3;
+ repeated DataParsingJobOutput dataParsingJobOutputs = 4;
+}
+
+message ParserRegisterRequest {
+ DataParser parser = 1;
+}
+
+message ParserRegisterResponse {
+ string parserId = 1;
+}
+
+message ParserListRequest {
+
+}
+
+message ParserListResponse {
+ repeated DataParser parsers = 1;
+}
+
+message ParsingJobRegisterRequest {
+ DataParsingJob parsingJob = 1;
+}
+
+message ParsingJobRegisterResponse {
+ string parsingJobId = 1;
+}
+
+message ParsingJobListRequest {
+
+}
+
+message ParsingJobListResponse {
+ repeated DataParsingJob parsers = 1;
+}
+
+
+service DataParserService {
+ rpc registerParser (ParserRegisterRequest) returns
(ParserRegisterResponse) {
+ }
+
+ rpc listParsers(ParserListRequest) returns (ParserListResponse) {
+
+ }
+
+ rpc registerParsingJob (ParsingJobRegisterRequest) returns
(ParsingJobRegisterResponse) {
+
+ }
+
+ rpc listParsingJobs (ParsingJobListRequest) returns
(ParsingJobListResponse) {
+
+ }
+}
\ No newline at end of file
diff --git a/data-orchestrator/data-orchestrator-service/pom.xml
b/data-orchestrator/data-orchestrator-service/pom.xml
index d09e145..10050e8 100644
--- a/data-orchestrator/data-orchestrator-service/pom.xml
+++ b/data-orchestrator/data-orchestrator-service/pom.xml
@@ -19,6 +19,7 @@
<modules>
<module>data-orchestrator-api-server</module>
<module>data-orchestrator-service-core</module>
+ <module>data-orchestrator-api-stub</module>
</modules>
</project>
\ No newline at end of file