You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opennlp.apache.org by jo...@apache.org on 2011/09/05 16:24:02 UTC
svn commit: r1165297 - in
/incubator/opennlp/sandbox/caseditor-opennlp-plugin: ./
src/main/java/org/apache/opennlp/caseditor/tokenize/
Author: joern
Date: Mon Sep 5 14:24:01 2011
New Revision: 1165297
URL: http://svn.apache.org/viewvc?rev=1165297&view=rev
Log:
OPENNLP-235 Added dummy tokenizer view.
Added:
incubator/opennlp/sandbox/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/tokenize/
incubator/opennlp/sandbox/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/tokenize/TokenizerView.java (with props)
incubator/opennlp/sandbox/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/tokenize/TokenizerViewPage.java (with props)
Modified:
incubator/opennlp/sandbox/caseditor-opennlp-plugin/plugin.xml
Modified: incubator/opennlp/sandbox/caseditor-opennlp-plugin/plugin.xml
URL: http://svn.apache.org/viewvc/incubator/opennlp/sandbox/caseditor-opennlp-plugin/plugin.xml?rev=1165297&r1=1165296&r2=1165297&view=diff
==============================================================================
--- incubator/opennlp/sandbox/caseditor-opennlp-plugin/plugin.xml (original)
+++ incubator/opennlp/sandbox/caseditor-opennlp-plugin/plugin.xml Mon Sep 5 14:24:01 2011
@@ -30,6 +30,11 @@
class="org.apache.opennlp.caseditor.sentdetect.SentenceDetectorView"
category="org.apache.opennlp.caseditor.views" />
+ <view id="org.apache.opennlp.caseditor.sentdetect.TokenizerView"
+ name="Tokenizer"
+ class="org.apache.opennlp.caseditor.tokenize.TokenizerView"
+ category="org.apache.opennlp.caseditor.views" />
+
<view id="org.apache.opennlp.caseditor.NameFinderView"
name="Name Finder"
class="org.apache.opennlp.caseditor.namefinder.NameFinderView"
Added: incubator/opennlp/sandbox/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/tokenize/TokenizerView.java
URL: http://svn.apache.org/viewvc/incubator/opennlp/sandbox/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/tokenize/TokenizerView.java?rev=1165297&view=auto
==============================================================================
--- incubator/opennlp/sandbox/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/tokenize/TokenizerView.java (added)
+++ incubator/opennlp/sandbox/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/tokenize/TokenizerView.java Mon Sep 5 14:24:01 2011
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+
+package org.apache.opennlp.caseditor.tokenize;
+
+import org.apache.uima.caseditor.editor.AnnotationEditorView;
+import org.apache.uima.caseditor.editor.ICasDocument;
+import org.apache.uima.caseditor.editor.ICasEditor;
+
+public class TokenizerView extends AnnotationEditorView {
+
+ public TokenizerView() {
+ super("The Tokenizer View is currently not available.");
+ }
+
+ protected PageRec doCreatePage(ICasEditor editor) {
+ PageRec result = null;
+
+ ICasDocument document = editor.getDocument();
+
+ if (document != null) {
+
+ TokenizerViewPage page = new TokenizerViewPage(editor);
+ initPage(page);
+ page.createControl(getPageBook());
+
+ result = new PageRec(editor, page);
+ }
+
+ return result;
+ }
+}
Propchange: incubator/opennlp/sandbox/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/tokenize/TokenizerView.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/opennlp/sandbox/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/tokenize/TokenizerViewPage.java
URL: http://svn.apache.org/viewvc/incubator/opennlp/sandbox/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/tokenize/TokenizerViewPage.java?rev=1165297&view=auto
==============================================================================
--- incubator/opennlp/sandbox/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/tokenize/TokenizerViewPage.java (added)
+++ incubator/opennlp/sandbox/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/tokenize/TokenizerViewPage.java Mon Sep 5 14:24:01 2011
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+
+package org.apache.opennlp.caseditor.tokenize;
+
+import org.apache.uima.caseditor.editor.ICasEditor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.part.Page;
+
+public class TokenizerViewPage extends Page {
+
+ private ICasEditor editor;
+
+ private Label testLabel;
+
+ TokenizerViewPage(ICasEditor editor) {
+ this.editor = editor;
+ }
+
+ @Override
+ public void createControl(Composite parent) {
+ testLabel = new Label(parent, SWT.NONE);
+ testLabel.setText("This is a test :)");
+ }
+
+ @Override
+ public Control getControl() {
+ return testLabel;
+ }
+
+ @Override
+ public void setFocus() {
+ testLabel.setFocus();
+ }
+}
Propchange: incubator/opennlp/sandbox/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/tokenize/TokenizerViewPage.java
------------------------------------------------------------------------------
svn:mime-type = text/plain