Adding proposed java api

Issue-ID: CPS-6

Signed-off-by: niamhcore <niamh.core@est.tech>
Change-Id: If5b787407b3ded3e6461e420c9483a21526a54a4
diff --git a/cps/cps-dependencies/pom.xml b/cps/cps-dependencies/pom.xml
index ee37b1e..1be8658 100644
--- a/cps/cps-dependencies/pom.xml
+++ b/cps/cps-dependencies/pom.xml
@@ -20,6 +20,7 @@
         <springfox.version>3.0.0</springfox.version>
         <swagger.version>2.1.4</swagger.version>
         <yangtools.version>5.0.6</yangtools.version>
+        <commons-lang3.version>3.11</commons-lang3.version>
     </properties>
 
     <dependencyManagement>
@@ -64,6 +65,11 @@
                 <version>${spock-core.version}</version>
             </dependency>
             <dependency>
+                <groupId>org.apache.commons</groupId>
+                <artifactId>commons-lang3</artifactId>
+                <version>${commons-lang3.version}</version>
+            </dependency>
+            <dependency>
                 <groupId>cglib</groupId>
                 <artifactId>cglib-nodep</artifactId>
                 <version>3.1</version>
diff --git a/cps/cps-rest/pom.xml b/cps/cps-rest/pom.xml
index 4f8746a..3c92a4e 100644
--- a/cps/cps-rest/pom.xml
+++ b/cps/cps-rest/pom.xml
@@ -46,7 +46,10 @@
             <groupId>io.springfox</groupId>

             <artifactId>springfox-boot-starter</artifactId>

         </dependency>

-

+        <dependency>

+            <groupId>org.apache.commons</groupId>

+            <artifactId>commons-lang3</artifactId>

+        </dependency>

         <dependency>

             <groupId>org.springframework.boot</groupId>

             <artifactId>spring-boot-starter-test</artifactId>

diff --git a/cps/interface-proposal/pom.xml b/cps/interface-proposal/pom.xml
new file mode 100644
index 0000000..6e9b70a
--- /dev/null
+++ b/cps/interface-proposal/pom.xml
@@ -0,0 +1,12 @@
+<?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">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>org.example</groupId>
+    <artifactId>interface-proposal</artifactId>
+    <version>1.0-SNAPSHOT</version>
+
+
+</project>
\ No newline at end of file
diff --git a/cps/interface-proposal/src/main/java/cps/javadoc/api/CpsAdminService.java b/cps/interface-proposal/src/main/java/cps/javadoc/api/CpsAdminService.java
new file mode 100644
index 0000000..5a9b19d
--- /dev/null
+++ b/cps/interface-proposal/src/main/java/cps/javadoc/api/CpsAdminService.java
@@ -0,0 +1,99 @@
+/*
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2020 Nordix Foundation
+ *  ================================================================================
+ *  Licensed 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.
+ *
+ *  SPDX-License-Identifier: Apache-2.0
+ *  ============LICENSE_END=========================================================
+ */
+
+package cps.javadoc.api;
+
+
+import cps.javadoc.spi.model.Anchor;
+import java.util.Collection;
+
+/**
+ * CPS Admin Service.
+ */
+
+public interface CpsAdminService {
+
+
+    /**
+     * Create a dataspace.
+     *
+     * @param dataspaceName dataspace name
+     * @return the name of the dataspace created
+     */
+    String createDataspace(String dataspaceName);
+
+    /**
+     * Read all dataspaces in the system.
+     *
+     * @return dataspace names
+     */
+    Collection<String> getDataspaces();
+
+    /**
+     * Delete a dataspace. This will delete the everything associated with this dataspace.
+     *
+     * @param dataspaceName dataspace name
+     */
+    void deleteDataspace(String dataspaceName);
+
+    /**
+     * Create an anchor in the given dataspace.
+     *
+     * @param dataspaceName dataspace name
+     * @param anchorName    anchor name
+     * @return the name of the created anchor
+     */
+    String createAnchor(String dataspaceName, String anchorName);
+
+    /**
+     * Read all anchors in the given a dataspace.
+     *
+     * @param dataspaceName dataspace name
+     * @return a collection of anchors
+     */
+    Collection<Anchor> getAnchors(String dataspaceName);
+
+    /**
+     * Read an anchor and the associated attributes given a anchor name and a dataspace.
+     *
+     * @param dataspaceName dataspace name
+     * @param anchorName    anchor name
+     * @return an anchor and the associated attributes
+     */
+    Anchor getAnchor(String dataspaceName, String anchorName);
+
+    /**
+     * Delete an anchor in the given dataspace.
+     *
+     * @param dataspaceName dataspace name
+     * @param anchorName    anchor name
+     */
+    void deleteAnchor(String dataspaceName, String anchorName);
+
+
+    /**
+     * Associate anchor to a module set.
+     *
+     * @param dataspaceName dataspace name
+     * @param anchorName    anchor name
+     * @param moduleSetName     module set name
+     */
+    void associateAnchorToModuleSet(String dataspaceName, String moduleSetName, String anchorName);
+
+}
\ No newline at end of file
diff --git a/cps/interface-proposal/src/main/java/cps/javadoc/api/DataStoreService.java b/cps/interface-proposal/src/main/java/cps/javadoc/api/DataStoreService.java
new file mode 100644
index 0000000..9fb0b12
--- /dev/null
+++ b/cps/interface-proposal/src/main/java/cps/javadoc/api/DataStoreService.java
@@ -0,0 +1,95 @@
+/*
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2020 Nordix Foundation
+ *  ================================================================================
+ *  Licensed 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.
+ *
+ *  SPDX-License-Identifier: Apache-2.0
+ *  ============LICENSE_END=========================================================
+ */
+
+package cps.javadoc.api;
+
+
+import cps.javadoc.spi.model.DataNode;
+
+/*
+ * Data interface for handling CPS data.
+ */
+public interface DataStoreService {
+
+
+    /**
+     * Add a data node under an anchor.
+     *
+     * @param anchorName    the anchor name
+     * @param dataspaceName the dataspace name
+     * @param dataNode      the data node
+     * @return XPath for the data node added
+     */
+    String addDataNode(String dataspaceName, String anchorName, DataNode dataNode);
+
+
+    /**
+     * Add a data node under an existing datanode.
+     *
+     * @param anchorName    the anchor name
+     * @param dataspaceName the dataspace name
+     * @param dataNode      the data node
+     * @param xPath         XPath identifier for parentNode
+     * @return XPath for the data node added
+     */
+    String addDataNode(String dataspaceName, String anchorName, String xPath, DataNode dataNode);
+
+    /**
+     * Count data nodes under an anchor.
+     *
+     * @param dataspaceName dataspace name
+     * @param anchorName anchor name
+     * @param cpsPath cps Path
+     * @return number of data nodes
+     */
+    Integer count(String dataspaceName, String anchorName, String cpsPath);
+
+    /**
+     * Count data nodes.
+     *
+     * @param dataspaceName dataspace name.
+     * @param cpsPath cps Path
+     * @return number of data nodes
+     */
+    Integer count(String dataspaceName, String cpsPath);
+
+    /**
+     * Update a data node.
+     *
+     * @param anchorName    the anchor name
+     * @param dataspaceName the dataspace name
+     * @param dataNode      the data node
+     * @return XPath for the data node updated
+     */
+    String updateDataNode(String dataspaceName, String anchorName, DataNode dataNode);
+
+    /**
+     * Set a leaf (attribute) with the given name to the given value.
+     *
+     * @param dataspaceName dataspace name
+     * @param anchorName anchor name
+     * @param xPath xpath
+     * @param leafName leaf name
+     * @param leafValue leaf value
+     */
+    void setLeaf(String dataspaceName, String anchorName, String xPath, String leafName, Object leafValue);
+
+    //TODO
+    //More specialised update methods will follow in future.
+}
diff --git a/cps/interface-proposal/src/main/java/cps/javadoc/api/ModuleStoreService.java b/cps/interface-proposal/src/main/java/cps/javadoc/api/ModuleStoreService.java
new file mode 100644
index 0000000..4ac45db
--- /dev/null
+++ b/cps/interface-proposal/src/main/java/cps/javadoc/api/ModuleStoreService.java
@@ -0,0 +1,65 @@
+/*
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2020 Nordix Foundation
+ *  ================================================================================
+ *  Licensed 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.
+ *
+ *  SPDX-License-Identifier: Apache-2.0
+ *  ============LICENSE_END=========================================================
+ */
+
+package cps.javadoc.api;
+
+import cps.javadoc.spi.model.ModuleRef;
+import java.io.InputStream;
+import java.util.Collection;
+
+/**
+ * Managing module sets.
+ */
+// Module retrieval will be done via database SPI and wont be exposed over API.
+public interface ModuleStoreService {
+
+    /**
+     * Create a module set.
+     *
+     * @param dataspaceName dataspace name
+     * @param moduleSetName module set name
+     * @param modulesData   an input stream containing module data
+     * @return the name of the created module set
+     */
+    String createModuleSet(String dataspaceName, String moduleSetName, InputStream modulesData);
+
+    /**
+     * Read all modules references in the store for the given dataspace.
+     *
+     * @param dataspaceName dataspace name
+     * @return a collection of module references
+     */
+    Collection<ModuleRef> getModuleReferences(String dataspaceName);
+
+    /**
+     * Read module sets in the store for the given dataspace.
+     *
+     * @param dataspaceName dataspace name
+     * @return a collection of module sets
+     */
+    Collection<String> getModuleSets(String dataspaceName);
+
+    /**
+     * Delete a module set.
+     *
+     * @param dataspaceName dataspace name
+     * @param moduleSetName module set name
+     */
+    void deleteModuleSet(String dataspaceName, String moduleSetName);
+}
diff --git a/cps/interface-proposal/src/main/java/cps/javadoc/api/QueryService.java b/cps/interface-proposal/src/main/java/cps/javadoc/api/QueryService.java
new file mode 100644
index 0000000..8cf98ca
--- /dev/null
+++ b/cps/interface-proposal/src/main/java/cps/javadoc/api/QueryService.java
@@ -0,0 +1,69 @@
+/*
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2020 Nordix Foundation
+ *  ================================================================================
+ *  Licensed 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.
+ *
+ *  SPDX-License-Identifier: Apache-2.0
+ *  ============LICENSE_END=========================================================
+ */
+
+package cps.javadoc.api;
+
+import cps.javadoc.spi.model.DataNode;
+import java.util.Collection;
+
+/*
+ * Query interface for handling queries.
+ */
+public interface QueryService {
+
+    /**
+     * Get a data node given an anchor for the given dataspace (return just one level with just cpsPath references to
+     * its children).
+     *
+     * @param dataspaceName dataspace name
+     * @param anchorName    anchor name
+     * @param xPathId       XPath ID
+     * @return a data node
+     */
+    DataNode getDataNode(String dataspaceName, String anchorName, String xPathId);
+
+    /**
+     * Get data nodes (under any anchor) given a cpsPath expression for the given dataspace.
+     *
+     * @param dataspaceName dataspace name
+     * @param xPathId       XPath ID
+     * @return a collection of data nodes
+     */
+    Collection<DataNode> getDataNodes(String dataspaceName, String xPathId);
+
+
+    /**
+     * Query data nodes (under any anchor) given a cpsPath expression for the given dataspace.
+     *
+     * @param dataspaceName dataspace name
+     * @param cpsPath       cps path
+     * @return a collection of data nodes
+     */
+    Collection<DataNode> queryDataNodesByCPsPath(String dataspaceName, String cpsPath);
+
+    /**
+     * Get all the relevant data nodes given a schema node identifier for the given dataspace.
+     *
+     * @param dataspaceName        dataspace name
+     * @param schemaNodeIdentifier schema node identifier
+     * @return a collection of data nodes
+     */
+    Collection<DataNode> queryDataNodesBySchemaNodeIdentifier(String dataspaceName, String schemaNodeIdentifier);
+
+}
\ No newline at end of file
diff --git a/cps/interface-proposal/src/main/java/cps/javadoc/spi/CpsAdminService.java b/cps/interface-proposal/src/main/java/cps/javadoc/spi/CpsAdminService.java
new file mode 100644
index 0000000..13674d3
--- /dev/null
+++ b/cps/interface-proposal/src/main/java/cps/javadoc/spi/CpsAdminService.java
@@ -0,0 +1,95 @@
+/*
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2020 Nordix Foundation
+ *  ================================================================================
+ *  Licensed 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.
+ *
+ *  SPDX-License-Identifier: Apache-2.0
+ *  ============LICENSE_END=========================================================
+ */
+
+package cps.javadoc.spi;
+
+import cps.javadoc.spi.model.Anchor;
+import java.util.Collection;
+import java.util.List;
+
+public interface CpsAdminService {
+
+    /**
+     * Create a dataspace.
+     *
+     * @param dataspaceName dataspace name
+     * @return the name of the created dataspace
+     */
+    String createDataspace(String dataspaceName);
+
+    /**
+     * Create an anchor in the given dataspace.
+     *
+     * @param dataspaceName dataspace name
+     * @param anchorName    anchor name
+     * @return the name of the created anchor
+     */
+    String createAnchor(String dataspaceName, String anchorName);
+
+    /**
+     * Get dataspaces.
+     *
+     * @return a list of dataspaces.
+     */
+    List<String> getDataspaces();
+
+    /**
+     * Read all anchors in the given a dataspace.
+     *
+     * @param dataspaceName dataspace name
+     * @return a collection of anchors
+     */
+    Collection<Anchor> getAnchors(String dataspaceName);
+
+    /**
+     * Read an anchor and the associated attributes given a anchor name and a dataspace.
+     *
+     * @param dataspaceName dataspace name
+     * @param anchorName    anchor name
+     * @return an anchor and the associated attributes
+     */
+    Anchor getAnchor(String dataspaceName, String anchorName);
+
+    /**
+     * Delete an anchor in the given dataspace.
+     *
+     * @param dataspaceName dataspace name
+     * @param anchorName    anchor name
+     */
+    void deleteAnchor(String dataspaceName, String anchorName);
+
+
+    /**
+     * Associate anchor to a module set.
+     *
+     * @param dataspaceName dataspace name
+     * @param anchorName    anchor name
+     * @param moduleSetName     module set name
+     */
+    void associateAnchorToModuleSet(String dataspaceName, String moduleSetName, String anchorName);
+
+    /**
+     * Returns a boolean value based on whether a dataspace exists or not.
+     *
+     * @param dataspaceName dataspace name
+     * @return a boolean value
+     */
+    boolean dataSpaceExists(String dataspaceName);
+
+}
diff --git a/cps/interface-proposal/src/main/java/cps/javadoc/spi/DataStoreService.java b/cps/interface-proposal/src/main/java/cps/javadoc/spi/DataStoreService.java
new file mode 100644
index 0000000..5de431a
--- /dev/null
+++ b/cps/interface-proposal/src/main/java/cps/javadoc/spi/DataStoreService.java
@@ -0,0 +1,132 @@
+/*
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2020 Nordix Foundation
+ *  ================================================================================
+ *  Licensed 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.
+ *
+ *  SPDX-License-Identifier: Apache-2.0
+ *  ============LICENSE_END=========================================================
+ */
+
+package cps.javadoc.spi;
+
+import cps.javadoc.spi.model.DataNode;
+import java.util.Collection;
+
+/*
+    Data Store Interface that is responsible for handling yang data.
+ */
+public interface DataStoreService {
+
+    /**
+     * Add a data node under an anchor.
+     *
+     * @param dataspaceName dataspace name
+     * @param anchorName    anchor name
+     * @param dataNode      data node
+     * @return XPath for the data node added
+     */
+    String addDataNode(String dataspaceName, String anchorName, DataNode dataNode);
+
+    /**
+     * Add a data node under a DataNode.
+     *
+     * @param dataspaceName dataspace name
+     * @param anchorName    anchor name
+     * @param xPath         XPath
+     * @param dataNode      data node
+     * @return XPath for the data node added
+     */
+    String addDataNode(String dataspaceName, String anchorName, String xPath, DataNode dataNode);
+
+    /**
+     * Get a data node.
+     *
+     * @param dataspaceName dataspace name
+     * @param anchorName    anchor name
+     * @param xPathId       XPath ID
+     * @return a data node
+     */
+    DataNode getDataNode(String dataspaceName, String anchorName, String xPathId);
+
+    /**
+     * Query data nodes.
+     *
+     * @param dataspaceName dataspace name
+     * @param anchorName    anchor name
+     * @param cpsPath       CPS Path
+     * @return a collection of data nodes
+     */
+    Collection<DataNode> queryDataNodes(String dataspaceName, String anchorName, String cpsPath);
+
+    /**
+     * Get data nodes using an output specification.
+     *
+     * @param dataspaceName       dataspace name
+     * @param anchorName          anchor name
+     * @param cpsPath             CPS Path
+     * @param outputSpecification output specification
+     * @return a collection of data nodes
+     */
+    Collection<DataNode> queryDataNodes(String dataspaceName, String anchorName, String cpsPath,
+        String outputSpecification);
+
+    /**
+     * Count data nodes under an anchor.
+     *
+     * @param dataspaceName dataspace name
+     * @param anchorName    anchor name
+     * @param cpsPath       CPS Path
+     * @return number of data nodes
+     */
+    Integer count(String dataspaceName, String anchorName, String cpsPath);
+
+    /**
+     * Count data nodes.
+     *
+     * @param dataspaceName dataspace name
+     * @param cpsPath       CPS Path
+     * @return number of data nodes
+     */
+    Integer count(String dataspaceName, String cpsPath);
+
+    /**
+     * Update data node.
+     *
+     * @param dataspaceName dataspace name
+     * @param anchorName    anchor name
+     * @param dataNode      data node
+     * @return XPath for the data node added
+     */
+    void updateDataNode(String dataspaceName, String anchorName, DataNode dataNode);
+
+    /**
+     * Set a leaf (attribute) with the given name to the given value.
+     *
+     * @param dataspaceName dataspace name
+     * @param anchorName    anchor name
+     * @param xPathId       XPath ID
+     * @param leafName      leaf name
+     * @param leafValue     leaf value
+     */
+    void setLeaf(String dataspaceName, String anchorName, String xPathId, String leafName, Object leafValue);
+
+    /**
+     * delete a data node.
+     *
+     * @param dataspaceName dataspace name
+     * @param anchorName    anchor name
+     * @param xPathId       XPath ID
+     */
+    void deleteDataNode(String dataspaceName, String anchorName, String xPathId);
+
+}
diff --git a/cps/interface-proposal/src/main/java/cps/javadoc/spi/ModuleStoreService.java b/cps/interface-proposal/src/main/java/cps/javadoc/spi/ModuleStoreService.java
new file mode 100644
index 0000000..1d31871
--- /dev/null
+++ b/cps/interface-proposal/src/main/java/cps/javadoc/spi/ModuleStoreService.java
@@ -0,0 +1,75 @@
+/*
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2020 Nordix Foundation
+ *  ================================================================================
+ *  Licensed 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.
+ *
+ *  SPDX-License-Identifier: Apache-2.0
+ *  ============LICENSE_END=========================================================
+ */
+
+package cps.javadoc.spi;
+
+
+import cps.javadoc.spi.model.Module;
+import cps.javadoc.spi.model.ModuleRef;
+import java.util.Collection;
+
+/**
+ * Service to manage modules.
+ */
+public interface ModuleStoreService {
+
+    /**
+     * Create a module set.
+     *
+     * @param dataspaceName dataspace name
+     * @param moduleSetName module set name
+     * @param modules       a collection of modules
+     * @return the name of the created module set
+     */
+    String createModuleSet(String dataspaceName, String moduleSetName, Collection<Module> modules);
+
+    /**
+     * Gets modules for a specific set.
+     *
+     * @param dataspaceName
+     * @param moduleSetName
+     * @return a collection of modules.
+     */
+    Collection<Module> getModules(String dataspaceName, String moduleSetName);
+
+    /**
+     * Gets modules references.
+     *
+     * @param dataspaceName
+     * @param moduleSetName
+     * @return a collection of modules.
+     */
+    Collection<ModuleRef> getModuleRefs(String dataspaceName, String moduleSetName);
+
+    /**
+     * Read module sets in the store for the given dataspace.
+     *
+     * @param dataspaceName dataspace name
+     * @return a collection of module sets
+     */
+    Collection<String> getModuleSets(String dataspaceName);
+
+    /**
+     * Delete a module set.
+     *
+     * @param dataspaceName dataspace name
+     * @param moduleSetName module set name
+     */
+    void deleteModuleSet(String dataspaceName, String moduleSetName);
+}
diff --git a/cps/interface-proposal/src/main/java/cps/javadoc/spi/model/Anchor.java b/cps/interface-proposal/src/main/java/cps/javadoc/spi/model/Anchor.java
new file mode 100644
index 0000000..d4c2470
--- /dev/null
+++ b/cps/interface-proposal/src/main/java/cps/javadoc/spi/model/Anchor.java
@@ -0,0 +1,31 @@
+/*
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2020 Nordix Foundation
+ *  ================================================================================
+ *  Licensed 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.
+ *
+ *  SPDX-License-Identifier: Apache-2.0
+ *  ============LICENSE_END=========================================================
+ */
+
+package cps.javadoc.spi.model;
+
+import java.util.Map;
+
+public class Anchor {
+
+    String dataspaceName;
+    String moduleSetName;
+    String anchorName;
+    Map<String,String> externalReferences;
+    String xPath;
+}
\ No newline at end of file
diff --git a/cps/interface-proposal/src/main/java/cps/javadoc/spi/model/DataNode.java b/cps/interface-proposal/src/main/java/cps/javadoc/spi/model/DataNode.java
new file mode 100644
index 0000000..c7db9a4
--- /dev/null
+++ b/cps/interface-proposal/src/main/java/cps/javadoc/spi/model/DataNode.java
@@ -0,0 +1,33 @@
+/*
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2020 Nordix Foundation
+ *  ================================================================================
+ *  Licensed 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.
+ *
+ *  SPDX-License-Identifier: Apache-2.0
+ *  ============LICENSE_END=========================================================
+ */
+
+package cps.javadoc.spi.model;
+
+import java.util.Collection;
+import java.util.Map;
+
+public class DataNode {
+
+    String dataspace;
+    String moduleSetName;
+    ModuleRef moduleRef;
+    String xPath;
+    Map<String, Object> leaves;
+    Collection<String> xPathsChildren;
+}
diff --git a/cps/interface-proposal/src/main/java/cps/javadoc/spi/model/Module.java b/cps/interface-proposal/src/main/java/cps/javadoc/spi/model/Module.java
new file mode 100644
index 0000000..7b0ef34
--- /dev/null
+++ b/cps/interface-proposal/src/main/java/cps/javadoc/spi/model/Module.java
@@ -0,0 +1,26 @@
+/*
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2020 Nordix Foundation
+ *  ================================================================================
+ *  Licensed 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.
+ *
+ *  SPDX-License-Identifier: Apache-2.0
+ *  ============LICENSE_END=========================================================
+ */
+
+package cps.javadoc.spi.model;
+
+public class Module {
+
+    ModuleRef moduleRef;
+    String content;
+}
diff --git a/cps/interface-proposal/src/main/java/cps/javadoc/spi/model/ModuleRef.java b/cps/interface-proposal/src/main/java/cps/javadoc/spi/model/ModuleRef.java
new file mode 100644
index 0000000..fa73aef
--- /dev/null
+++ b/cps/interface-proposal/src/main/java/cps/javadoc/spi/model/ModuleRef.java
@@ -0,0 +1,26 @@
+/*
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2020 Nordix Foundation
+ *  ================================================================================
+ *  Licensed 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.
+ *
+ *  SPDX-License-Identifier: Apache-2.0
+ *  ============LICENSE_END=========================================================
+ */
+
+package cps.javadoc.spi.model;
+
+public class ModuleRef {
+
+    String namespace;
+    String revision;
+}
\ No newline at end of file