summaryrefslogtreecommitdiff
path: root/src/analysis/BrandChecker.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/analysis/BrandChecker.java')
-rw-r--r--src/analysis/BrandChecker.java61
1 files changed, 61 insertions, 0 deletions
diff --git a/src/analysis/BrandChecker.java b/src/analysis/BrandChecker.java
new file mode 100644
index 0000000..6b57a39
--- /dev/null
+++ b/src/analysis/BrandChecker.java
@@ -0,0 +1,61 @@
+/*
+ * DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004
+ *
+ * Copyright (C) 2004 Sam Hocevar
+ *
+ * Everyone is permitted to copy and distribute verbatim or modified copies
+ * of this license document, and changing it is allowed as long as the name is
+ * changed.
+ *
+ * DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING,
+ * DISTRIBUTION AND MODIFICATION
+ *
+ * 0. You just DO WHAT THE FUCK YOU WANT TO.
+ */
+package analysis;
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * This class obtains a text and returns the brands that are contained in this
+ * text.
+ *
+ * @author Maurice Laveaux
+ */
+public class BrandChecker {
+
+ /**
+ * @param filename The filename that contains all the brands.
+ */
+ public BrandChecker(final String filename) {
+ try {
+ readFile(filename);
+ } catch (FileNotFoundException ex) {
+ Logger.getLogger(BrandChecker.class.getName()).log(Level.SEVERE, null, ex);
+ }
+ }
+
+ /**
+ * Get the brands that are in some text.
+ *
+ * @param text Any valid text.
+ * @return The list of brands that are contained in this text or null.
+ */
+ public List<String> getBrands(String text) {
+
+
+
+ return null;
+ }
+
+ private void readFile(final String filename) throws FileNotFoundException {
+
+ InputStream inFile = new FileInputStream(filename);
+
+ }
+}