aboutsummaryrefslogtreecommitdiff
path: root/src/main/model/html
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/model/html')
-rw-r--r--src/main/model/html/ElementNode.java2
-rw-r--r--src/main/model/html/HtmlParser.java1
-rw-r--r--src/main/model/html/Node.java14
-rw-r--r--src/main/model/html/TextNode.java1
4 files changed, 14 insertions, 4 deletions
diff --git a/src/main/model/html/ElementNode.java b/src/main/model/html/ElementNode.java
index 5ff4a0f..ef241e4 100644
--- a/src/main/model/html/ElementNode.java
+++ b/src/main/model/html/ElementNode.java
@@ -1,12 +1,10 @@
package model.html;
-import model.util.Node;
import org.javatuples.Pair;
import org.json.JSONObject;
import persistance.JsonAble;
import java.util.ArrayList;
-import java.util.Optional;
/**
* This ElementNode class represents an HTML tag and nested tags.
diff --git a/src/main/model/html/HtmlParser.java b/src/main/model/html/HtmlParser.java
index f0829f4..e1ebaa1 100644
--- a/src/main/model/html/HtmlParser.java
+++ b/src/main/model/html/HtmlParser.java
@@ -2,7 +2,6 @@ package model.html;
import java.util.*;
-import model.util.Node;
import org.javatuples.*;
import org.json.JSONObject;
import persistance.JsonAble;
diff --git a/src/main/model/html/Node.java b/src/main/model/html/Node.java
new file mode 100644
index 0000000..3284b3c
--- /dev/null
+++ b/src/main/model/html/Node.java
@@ -0,0 +1,14 @@
+package model.html;
+
+import org.json.JSONObject;
+
+/**
+ * This Node represents an abstract relationship between ElementNode and TextNode.
+ * It's extremely helpful / necessary for Lists of arbitrary ElementNodes/TextNodes.
+ */
+public interface Node {
+ // Return a representation of the Node. Useful for debugging.
+ public String getData();
+
+ public JSONObject serialize();
+}
diff --git a/src/main/model/html/TextNode.java b/src/main/model/html/TextNode.java
index 2e89326..82ae245 100644
--- a/src/main/model/html/TextNode.java
+++ b/src/main/model/html/TextNode.java
@@ -1,6 +1,5 @@
package model.html;
-import model.util.Node;
import org.json.JSONObject;
import persistance.JsonAble;