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/08/29 19:22:32 UTC

svn commit: r1162906 - /incubator/opennlp/sandbox/caseditor-corpus-server-plugin/src/main/java/org/apache/opennlp/corpus_server/caseditor/CorpusServerCasEditorInput.java

Author: joern
Date: Mon Aug 29 17:22:31 2011
New Revision: 1162906

URL: http://svn.apache.org/viewvc?rev=1162906&view=rev
Log:
OPENNLP-252 Added corpus server editor input, there a resource is identified by an URL and cas id

Added:
    incubator/opennlp/sandbox/caseditor-corpus-server-plugin/src/main/java/org/apache/opennlp/corpus_server/caseditor/CorpusServerCasEditorInput.java   (with props)

Added: incubator/opennlp/sandbox/caseditor-corpus-server-plugin/src/main/java/org/apache/opennlp/corpus_server/caseditor/CorpusServerCasEditorInput.java
URL: http://svn.apache.org/viewvc/incubator/opennlp/sandbox/caseditor-corpus-server-plugin/src/main/java/org/apache/opennlp/corpus_server/caseditor/CorpusServerCasEditorInput.java?rev=1162906&view=auto
==============================================================================
--- incubator/opennlp/sandbox/caseditor-corpus-server-plugin/src/main/java/org/apache/opennlp/corpus_server/caseditor/CorpusServerCasEditorInput.java (added)
+++ incubator/opennlp/sandbox/caseditor-corpus-server-plugin/src/main/java/org/apache/opennlp/corpus_server/caseditor/CorpusServerCasEditorInput.java Mon Aug 29 17:22:31 2011
@@ -0,0 +1,70 @@
+/*
+ * 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.corpus_server.caseditor;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IPersistableElement;
+
+// Serialization must be supported, right?!
+public class CorpusServerCasEditorInput implements IEditorInput {
+
+  private String corpusUrl;
+  private String casId;
+  
+  CorpusServerCasEditorInput(String corpusUrl, String casId) {
+    this.corpusUrl = corpusUrl;
+    this.casId = casId;
+  }
+  
+  @Override
+  public Object getAdapter(Class clazz) {
+    return null;
+  }
+
+  // can be checked through an http lookup
+  @Override
+  public boolean exists() {
+    return false;
+  }
+
+  @Override
+  public ImageDescriptor getImageDescriptor() {
+    return null;
+  }
+
+  @Override
+  public String getName() {
+    return casId;
+  }
+
+  // it is ... 
+  @Override
+  public IPersistableElement getPersistable() {
+    return null;
+  }
+
+  @Override
+  public String getToolTipText() {
+    return "";
+  }
+
+  public String getServerUrl() {
+    return corpusUrl;
+  }
+}

Propchange: incubator/opennlp/sandbox/caseditor-corpus-server-plugin/src/main/java/org/apache/opennlp/corpus_server/caseditor/CorpusServerCasEditorInput.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain