Skip to content

Commit

Permalink
#607 Gutenberg Crawler
Browse files Browse the repository at this point in the history
#607 Gutenberg Crawler
  • Loading branch information
ReshmaBhatia committed Jul 17, 2017
1 parent 9400369 commit 755e389
Show file tree
Hide file tree
Showing 26 changed files with 2,577 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package edu.usc.cssl.tacit.common.ui.corpusmanagement.services;

public enum CMDataType {
JSON,REDDIT_JSON, TWITTER_JSON, STACKEXCHANGE_JSON, FRONTIER_JSON, TYPEPAD_JSON, CONGRESS_JSON, PLAIN_TEXT, XML, MICROSOFT_WORD, PRESIDENCY_JSON, HANSARD_JSON, IMPORTED_CSV, PLOSONE_JSON, GOVTRACK_JSON, LATIN_JSON;
JSON,REDDIT_JSON, TWITTER_JSON, STACKEXCHANGE_JSON, FRONTIER_JSON, TYPEPAD_JSON, CONGRESS_JSON, PLAIN_TEXT, XML, MICROSOFT_WORD, PRESIDENCY_JSON, HANSARD_JSON, IMPORTED_CSV, PLOSONE_JSON, GOVTRACK_JSON, LATIN_JSON, GUTENBERG_JSON;

public static CMDataType get(String dataType) {
if(dataType.equals("PLAIN_TEXT")) return CMDataType.PLAIN_TEXT;
Expand All @@ -20,6 +20,7 @@ public static CMDataType get(String dataType) {
else if(dataType.equals("PLOSONE_JSON")) return CMDataType.PLOSONE_JSON;
else if(dataType.equals("GOVTRACK_JSON")) return CMDataType.GOVTRACK_JSON;
else if(dataType.equals("LATIN_JSON")) return CMDataType.LATIN_JSON;
else if(dataType.equals("GUTENBERG_JSON")) return CMDataType.GUTENBERG_JSON;
return null;
}
}
16 changes: 16 additions & 0 deletions edu.usc.cssl.tacit.crawlers.gutenberg.ui/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Ui
Bundle-SymbolicName: edu.usc.cssl.tacit.crawlers.gutenberg.ui;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: edu.usc.cssl.tacit.crawlers.gutenberg.ui.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.ui.forms;bundle-version="3.6.200",
edu.usc.cssl.tacit.common.ui;bundle-version="1.0.0",
edu.usc.cssl.tacit.help;bundle-version="1.0.0",
org.eclipse.help;bundle-version="3.6.0",
edu.usc.cssl.tacit.common;bundle-version="1.0.0",
edu.usc.cssl.tacit.crawlers.gutenberg;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ActivationPolicy: lazy
5 changes: 5 additions & 0 deletions edu.usc.cssl.tacit.crawlers.gutenberg.ui/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions edu.usc.cssl.tacit.crawlers.gutenberg.ui/plugin.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
point="org.eclipse.ui.views">
<view
class="edu.usc.cssl.tacit.crawlers.gutenberg.ui.GutenbergCrawlerView"
icon="icons/GutenbergCrawlerIcon.png"
id="edu.usc.cssl.tacit.crawlers.gutenberg.ui.view1"
name="Gutenberg Crawler"
restorable="true">
</view>
</extension>
<extension
point="org.eclipse.ui.menus">
<menuContribution
locationURI="menu:crawl">
<command
commandId="edu.usc.cssl.tacit.crawlers.gutenberg.ui.command2"
icon="icons/GutenbergCrawlerIcon.png"
label="Gutenberg Crawler">
</command>
</menuContribution>
</extension>
<extension
id="crawler.gutenberg"
point="org.eclipse.ui.commands">
<command
id="edu.usc.cssl.tacit.crawlers.gutenberg.ui.command2"
name="Gutenberg Command">
</command>
</extension>
<extension
point="org.eclipse.ui.handlers">
<handler
class="edu.usc.cssl.tacit.crawlers.gutenberg.ui.handlers.GutenbergCrawlerViewHandler"
commandId="edu.usc.cssl.tacit.crawlers.gutenberg.ui.command2">
</handler>
</extension>

</plugin>
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
package edu.usc.cssl.tacit.crawlers.gutenberg.ui;

import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;

/**
* The activator class controls the plug-in life cycle
*/
public class Activator extends AbstractUIPlugin {

// The plug-in ID
public static final String PLUGIN_ID = "edu.usc.cssl.tacit.crawlers.gutenberg.ui"; //$NON-NLS-1$

// The shared instance
private static Activator plugin;

/**
* The constructor
*/
public Activator() {
}

/*
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
}

/*
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
}

/**
* Returns the shared instance
*
* @return the shared instance
*/
public static Activator getDefault() {
return plugin;
}

}
Loading

0 comments on commit 755e389

Please sign in to comment.