summaryrefslogtreecommitdiffstats
path: root/Master/Agile Software Development/TestApp/src/testapp/data/ScriptItem.java
diff options
context:
space:
mode:
Diffstat (limited to 'Master/Agile Software Development/TestApp/src/testapp/data/ScriptItem.java')
-rw-r--r--Master/Agile Software Development/TestApp/src/testapp/data/ScriptItem.java62
1 files changed, 62 insertions, 0 deletions
diff --git a/Master/Agile Software Development/TestApp/src/testapp/data/ScriptItem.java b/Master/Agile Software Development/TestApp/src/testapp/data/ScriptItem.java
new file mode 100644
index 0000000..1764f3a
--- /dev/null
+++ b/Master/Agile Software Development/TestApp/src/testapp/data/ScriptItem.java
@@ -0,0 +1,62 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package testapp.data;
+
+import java.util.HashMap;
+import java.util.logging.*;
+/**
+ *
+ * @author sven
+ */
+public class ScriptItem extends Item {
+
+ @Override
+ public ItemClassification analyse() {
+ setClassification(ItemClassification.HARMLESS);
+
+ checkPlace();
+ if (itemPlace == ItemPlace.REMOTE) {
+ setClassification(ItemClassification.CRITICAL);
+ } else if (itemPlace == ItemPlace.LOCAL) {
+ setClassification(ItemClassification.HARMLESS);
+ }
+/* TODO: Take Child classifcation
+ for (Item child : childItems) {
+ childClassification = child.analyse();
+ }
+ if ((itemClassification.compareTo(childClassification) > 0)) {
+ setClassification(childClassification);
+ }
+*/
+ return doAnalyse();
+ }
+
+ public ScriptItem(String url, Item parent) {
+ super(url, parent);
+ itemType = ItemType.SCRIPT;
+ }
+
+// public ScriptItem(String url) {
+// super(url);
+// itemType = ItemType.SCRIPT;
+// }
+
+ @Override
+ protected HashMap<String, String> getAttributes() {
+ if (attributes == null) {
+ attributes = new HashMap<String, String>();
+ }
+ attributes.put("shape", "ellipse");
+ attributes.put("style", "filled");
+ attributes.put("fontname", "Verdana");
+ attributes.put("fontsize", "10");
+ return attributes;
+ }
+
+ @Override
+ protected String getGraphNodetext() {
+ return "SCRIPT: "+this.url;
+ }
+}