You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by sc...@apache.org on 2007/02/20 20:01:20 UTC
svn commit: r509708 [6/7] - in /incubator/uima/sandbox/trunk/CasEditor: ./
META-INF/ src/main/assembly/ src/main/java/org/apache/uima/caseditor/
src/main/java/org/apache/uima/caseditor/core/
src/main/java/org/apache/uima/caseditor/core/model/ src/main/...
Modified: incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/editor/properties/validator/CellEditorValidatorFacotory.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/editor/properties/validator/CellEditorValidatorFacotory.java?view=diff&rev=509708&r1=509707&r2=509708
==============================================================================
--- incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/editor/properties/validator/CellEditorValidatorFacotory.java (original)
+++ incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/editor/properties/validator/CellEditorValidatorFacotory.java Tue Feb 20 11:01:12 2007
@@ -1,63 +1,60 @@
-/*
- * 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.uima.caseditor.editor.properties.validator;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.jface.viewers.ICellEditorValidator;
-
-/**
- * TODO: add javadoc here
- *
- * @author <a href="mailto:kottmann@gmail.com">Joern Kottmann</a>
- * @version $Revision: 1.2.2.2 $, $Date: 2007/01/04 15:00:53 $
- */
-public class CellEditorValidatorFacotory {
- private static Map<Class, ICellEditorValidator> sValidatorMap = new HashMap<Class, ICellEditorValidator>();
-
- static {
- sValidatorMap.put(Byte.class, new ByteCellEditorValidator());
- sValidatorMap.put(Short.class, new ShortCellEditorValidator());
- sValidatorMap.put(Integer.class, new IntegerCellEditorValidator());
- sValidatorMap.put(Long.class, new LongCellEditorValidator());
- sValidatorMap.put(Float.class, new FloatCellEditorValidator());
- }
-
- private CellEditorValidatorFacotory() {
- // must not be instanciated
- }
-
- /**
- * Retrives the appropritae {@link ICellEditorValidator} for the given class or none if not
- * available.
- *
- * @param type
- *
- * @return {@link ICellEditorValidator} or null
- */
- public static ICellEditorValidator createValidator(Class type) {
- if (type == null) {
- throw new IllegalArgumentException("type must not be null!");
- }
-
- return sValidatorMap.get(type);
- }
+/*
+ * 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.uima.caseditor.editor.properties.validator;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.jface.viewers.ICellEditorValidator;
+
+/**
+ * TODO: add javadoc here
+ */
+public class CellEditorValidatorFacotory {
+ private static Map<Class, ICellEditorValidator> sValidatorMap = new HashMap<Class, ICellEditorValidator>();
+
+ static {
+ sValidatorMap.put(Byte.class, new ByteCellEditorValidator());
+ sValidatorMap.put(Short.class, new ShortCellEditorValidator());
+ sValidatorMap.put(Integer.class, new IntegerCellEditorValidator());
+ sValidatorMap.put(Long.class, new LongCellEditorValidator());
+ sValidatorMap.put(Float.class, new FloatCellEditorValidator());
+ }
+
+ private CellEditorValidatorFacotory() {
+ // must not be instanciated
+ }
+
+ /**
+ * Retrives the appropritae {@link ICellEditorValidator} for the given class or none if not
+ * available.
+ *
+ * @param type
+ *
+ * @return {@link ICellEditorValidator} or null
+ */
+ public static ICellEditorValidator createValidator(Class type) {
+ if (type == null) {
+ throw new IllegalArgumentException("type must not be null!");
+ }
+
+ return sValidatorMap.get(type);
+ }
}
Modified: incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/editor/properties/validator/FloatCellEditorValidator.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/editor/properties/validator/FloatCellEditorValidator.java?view=diff&rev=509708&r1=509707&r2=509708
==============================================================================
--- incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/editor/properties/validator/FloatCellEditorValidator.java (original)
+++ incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/editor/properties/validator/FloatCellEditorValidator.java Tue Feb 20 11:01:12 2007
@@ -1,51 +1,48 @@
-/*
- * 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.uima.caseditor.editor.properties.validator;
-
-import org.eclipse.jface.viewers.ICellEditorValidator;
-
-/**
- * This {@link ICellEditorValidator} validates {@link String} values which represents a
- * {@link Float}.
- *
- * For validation {@link Float#parseFloat(String)} is used.
- *
- * @author <a href="mailto:kottmann@gmail.com">Joern Kottmann</a>
- * @version $Revision: 1.1.2.2 $, $Date: 2007/01/04 15:00:53 $
- */
-class FloatCellEditorValidator implements ICellEditorValidator {
- /**
- * Checks if the given value is a valid {@link Float}.
- *
- * @param value
- * @return null if valid otherwise an error message
- */
- public String isValid(Object value) {
- assert value instanceof String;
-
- try {
- Float.parseFloat((String) value);
- } catch (NumberFormatException e) {
- return "Not a float!";
- }
-
- return null;
- }
+/*
+ * 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.uima.caseditor.editor.properties.validator;
+
+import org.eclipse.jface.viewers.ICellEditorValidator;
+
+/**
+ * This {@link ICellEditorValidator} validates {@link String} values which represents a
+ * {@link Float}.
+ *
+ * For validation {@link Float#parseFloat(String)} is used.
+ */
+class FloatCellEditorValidator implements ICellEditorValidator {
+ /**
+ * Checks if the given value is a valid {@link Float}.
+ *
+ * @param value
+ * @return null if valid otherwise an error message
+ */
+ public String isValid(Object value) {
+ assert value instanceof String;
+
+ try {
+ Float.parseFloat((String) value);
+ } catch (NumberFormatException e) {
+ return "Not a float!";
+ }
+
+ return null;
+ }
}
Modified: incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/editor/properties/validator/IntegerCellEditorValidator.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/editor/properties/validator/IntegerCellEditorValidator.java?view=diff&rev=509708&r1=509707&r2=509708
==============================================================================
--- incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/editor/properties/validator/IntegerCellEditorValidator.java (original)
+++ incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/editor/properties/validator/IntegerCellEditorValidator.java Tue Feb 20 11:01:12 2007
@@ -1,51 +1,48 @@
-/*
- * 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.uima.caseditor.editor.properties.validator;
-
-import org.eclipse.jface.viewers.ICellEditorValidator;
-
-/**
- * This {@link ICellEditorValidator} validates {@link String} values which represents a
- * {@link Integer}.
- *
- * For validation {@link Integer#parseInt(String)} is used.
- *
- * @author <a href="mailto:kottmann@gmail.com">Joern Kottmann</a>
- * @version $Revision: 1.1.2.2 $, $Date: 2007/01/04 15:00:53 $
- */
-class IntegerCellEditorValidator implements ICellEditorValidator {
- /**
- * Checks if the given value is a valid {@link Integer}.
- *
- * @param value
- * @return null if valid otherwise an error message
- */
- public String isValid(Object value) {
- assert value instanceof String;
-
- try {
- Integer.parseInt((String) value);
- } catch (NumberFormatException e) {
- return "Not an integer!";
- }
-
- return null;
- }
+/*
+ * 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.uima.caseditor.editor.properties.validator;
+
+import org.eclipse.jface.viewers.ICellEditorValidator;
+
+/**
+ * This {@link ICellEditorValidator} validates {@link String} values which represents a
+ * {@link Integer}.
+ *
+ * For validation {@link Integer#parseInt(String)} is used.
+ */
+class IntegerCellEditorValidator implements ICellEditorValidator {
+ /**
+ * Checks if the given value is a valid {@link Integer}.
+ *
+ * @param value
+ * @return null if valid otherwise an error message
+ */
+ public String isValid(Object value) {
+ assert value instanceof String;
+
+ try {
+ Integer.parseInt((String) value);
+ } catch (NumberFormatException e) {
+ return "Not an integer!";
+ }
+
+ return null;
+ }
}
Modified: incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/editor/properties/validator/LongCellEditorValidator.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/editor/properties/validator/LongCellEditorValidator.java?view=diff&rev=509708&r1=509707&r2=509708
==============================================================================
--- incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/editor/properties/validator/LongCellEditorValidator.java (original)
+++ incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/editor/properties/validator/LongCellEditorValidator.java Tue Feb 20 11:01:12 2007
@@ -1,51 +1,48 @@
-/*
- * 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.uima.caseditor.editor.properties.validator;
-
-import org.eclipse.jface.viewers.ICellEditorValidator;
-
-/**
- * This {@link ICellEditorValidator} validates {@link String} values which represents a {@link Long}.
- *
- * For validation {@link Long#parseLong(String)} is used.
- *
- * @author <a href="mailto:kottmann@gmail.com">Joern Kottmann</a>
- * @version $Revision: 1.1.2.2 $, $Date: 2007/01/04 15:00:53 $
- */
-public class LongCellEditorValidator implements ICellEditorValidator {
-
- /**
- * Checks if the given value is a valid {@link Long}.
- *
- * @param value
- * @return null if valid otherwise an error message
- */
- public String isValid(Object value) {
- assert value instanceof String;
-
- try {
- Long.parseLong((String) value);
- } catch (NumberFormatException e) {
- return "Not a long!";
- }
-
- return null;
- }
+/*
+ * 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.uima.caseditor.editor.properties.validator;
+
+import org.eclipse.jface.viewers.ICellEditorValidator;
+
+/**
+ * This {@link ICellEditorValidator} validates {@link String} values which represents a {@link Long}.
+ *
+ * For validation {@link Long#parseLong(String)} is used.
+ */
+public class LongCellEditorValidator implements ICellEditorValidator {
+
+ /**
+ * Checks if the given value is a valid {@link Long}.
+ *
+ * @param value
+ * @return null if valid otherwise an error message
+ */
+ public String isValid(Object value) {
+ assert value instanceof String;
+
+ try {
+ Long.parseLong((String) value);
+ } catch (NumberFormatException e) {
+ return "Not a long!";
+ }
+
+ return null;
+ }
}
Modified: incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/editor/properties/validator/ShortCellEditorValidator.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/editor/properties/validator/ShortCellEditorValidator.java?view=diff&rev=509708&r1=509707&r2=509708
==============================================================================
--- incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/editor/properties/validator/ShortCellEditorValidator.java (original)
+++ incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/editor/properties/validator/ShortCellEditorValidator.java Tue Feb 20 11:01:12 2007
@@ -1,52 +1,49 @@
-/*
- * 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.uima.caseditor.editor.properties.validator;
-
-import org.eclipse.jface.viewers.ICellEditorValidator;
-
-/**
- * This {@link ICellEditorValidator} validates {@link String} values which represents a
- * {@link Short}.
- *
- * For validation {@link Short#parseShort(String)} is used.
- *
- * @author <a href="mailto:kottmann@gmail.com">Joern Kottmann</a>
- * @version $Revision: 1.1.2.2 $, $Date: 2007/01/04 15:00:53 $
- */
-public class ShortCellEditorValidator implements ICellEditorValidator {
-
- /**
- * Checks if the given value is a valid {@link Short}.
- *
- * @param value
- * @return null if valid otherwise an error message
- */
- public String isValid(Object value) {
- assert value instanceof String;
-
- try {
- Short.parseShort((String) value);
- } catch (NumberFormatException e) {
- return "Not a short!";
- }
-
- return null;
- }
-}
+/*
+ * 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.uima.caseditor.editor.properties.validator;
+
+import org.eclipse.jface.viewers.ICellEditorValidator;
+
+/**
+ * This {@link ICellEditorValidator} validates {@link String} values which represents a
+ * {@link Short}.
+ *
+ * For validation {@link Short#parseShort(String)} is used.
+ */
+public class ShortCellEditorValidator implements ICellEditorValidator {
+
+ /**
+ * Checks if the given value is a valid {@link Short}.
+ *
+ * @param value
+ * @return null if valid otherwise an error message
+ */
+ public String isValid(Object value) {
+ assert value instanceof String;
+
+ try {
+ Short.parseShort((String) value);
+ } catch (NumberFormatException e) {
+ return "Not a short!";
+ }
+
+ return null;
+ }
+}
Modified: incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/FeatureStructureTransfer.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/FeatureStructureTransfer.java?view=diff&rev=509708&r1=509707&r2=509708
==============================================================================
--- incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/FeatureStructureTransfer.java (original)
+++ incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/FeatureStructureTransfer.java Tue Feb 20 11:01:12 2007
@@ -22,9 +22,6 @@
/**
* This class is able to transfer a {@link com.ibm.uima.cas.FeatureStructure}
* objects.
- *
- * @author <a href="mailto:kottmann@gmail.com">Joern Kottmann</a>
- * @version $Revision: 1.1.2.1 $, $Date: 2007/01/04 14:37:53 $
*/
public class FeatureStructureTransfer extends ObjectTransfer
{
Modified: incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/NlpPerspectiveFactory.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/NlpPerspectiveFactory.java?view=diff&rev=509708&r1=509707&r2=509708
==============================================================================
--- incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/NlpPerspectiveFactory.java (original)
+++ incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/NlpPerspectiveFactory.java Tue Feb 20 11:01:12 2007
@@ -30,9 +30,6 @@
/**
* This <code>PerspectiveFactory</code> generates the intial layout
* for the NLP perspective.
- *
- * @author <a href="mailto:kottmann@gmail.com">Joern Kottmann</a>
- * @version $Revision: 1.4.2.1 $, $Date: 2007/01/04 14:37:53 $
*/
public class NlpPerspectiveFactory implements IPerspectiveFactory
{
Modified: incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/ObjectTransfer.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/ObjectTransfer.java?view=diff&rev=509708&r1=509707&r2=509708
==============================================================================
--- incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/ObjectTransfer.java (original)
+++ incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/ObjectTransfer.java Tue Feb 20 11:01:12 2007
@@ -21,7 +21,6 @@
import java.util.Arrays;
-
import org.apache.uima.caseditor.core.util.IDGenerator;
import org.eclipse.swt.dnd.ByteArrayTransfer;
import org.eclipse.swt.dnd.TransferData;
@@ -29,9 +28,6 @@
/**
* This class is able to transfer an {@link Object} object. The object gets
* saved and only an Id is transfered.
- *
- * @author <a href="mailto:kottmann@gmail.com">Joern Kottmann</a>
- * @version $Revision: 1.1.2.1 $, $Date: 2007/01/04 14:37:53 $
*/
public abstract class ObjectTransfer extends ByteArrayTransfer
{
Modified: incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/action/AnnotatorActionRunnable.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/action/AnnotatorActionRunnable.java?view=diff&rev=509708&r1=509707&r2=509708
==============================================================================
--- incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/action/AnnotatorActionRunnable.java (original)
+++ incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/action/AnnotatorActionRunnable.java Tue Feb 20 11:01:12 2007
@@ -22,9 +22,8 @@
import java.lang.reflect.InvocationTargetException;
import java.util.Collection;
-
+import org.apache.uima.analysis_engine.AnalysisEngine;
import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
-import org.apache.uima.analysis_engine.TextAnalysisEngine;
import org.apache.uima.caseditor.core.IDocument;
import org.apache.uima.caseditor.core.model.DocumentElement;
import org.apache.uima.caseditor.core.uima.AnnotatorConfiguration;
@@ -36,9 +35,6 @@
/**
* TODO: synchronize filesystem after annotator run.
* TODO: move this over to core plugin
- *
- * @author <a href="mailto:kottmann@gmail.com">Joern Kottmann</a>
- * @version $Revision: 1.4.2.1 $, $Date: 2007/01/04 14:37:53 $
*/
public final class AnnotatorActionRunnable implements IRunnableWithProgress
{
@@ -71,7 +67,7 @@
monitor.subTask("Initializing tagger, "
+ "please stand by.");
- TextAnalysisEngine annotatorInstance;
+ AnalysisEngine annotatorInstance;
try
{
@@ -85,8 +81,16 @@
monitor.subTask("Tagging, please stand by.");
- for (IDocument document : mDocuments)
+ for (DocumentElement element : mDocuments)
{
+
+ IDocument document = null;
+ try {
+ document = element.getDocument();
+ } catch (CoreException e1) {
+ e1.printStackTrace();
+ }
+
try
{
annotatorInstance.process(document.getCAS());
@@ -94,12 +98,13 @@
catch (AnalysisEngineProcessException e)
{
throw new InvocationTargetException(e);
- }
+ }
+
+ // TODO: save it and notify other about changes
- // TODO: refactor here, add working copy support
try
{
- ((DocumentElement) document).writeToFile();
+ element.saveDocument();
}
catch (CoreException e)
{
Modified: incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/action/ConsumerActionRunnable.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/action/ConsumerActionRunnable.java?view=diff&rev=509708&r1=509707&r2=509708
==============================================================================
--- incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/action/ConsumerActionRunnable.java (original)
+++ incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/action/ConsumerActionRunnable.java Tue Feb 20 11:01:12 2007
@@ -24,9 +24,8 @@
import java.lang.reflect.InvocationTargetException;
import java.util.Collection;
-
import org.apache.uima.UIMAFramework;
-import org.apache.uima.analysis_engine.TextAnalysisEngine;
+import org.apache.uima.analysis_engine.AnalysisEngine;
import org.apache.uima.cas.CAS;
import org.apache.uima.caseditor.core.model.CorpusElement;
import org.apache.uima.caseditor.core.model.NlpProject;
@@ -54,9 +53,6 @@
* This action launches the cpm with the configured cas consumer.
*
* TODO: move over to core plugin
- *
- * @author <a href="mailto:kottmann@gmail.com">Joern Kottmann</a>
- * @version $Revision: 1.3.2.1 $, $Date: 2007/01/04 14:37:53 $
*/
public class ConsumerActionRunnable implements IRunnableWithProgress
{
@@ -143,12 +139,12 @@
XMLParser xmlParser = UIMAFramework.getXMLParser();
InputStream inIndex = getClass().getClassLoader().getResourceAsStream(
- "net/sf/tae/core/Index.xml");
+ "org/apache/uima/caseditor/core/Index.xml");
if (inIndex == null)
{
throw new InvocationTargetException(null,
- "net/sf/tae/ui/action/Index.xml"
+ "org/apache/uima/caseditor/ui/action/Index.xml"
+ " is missing on the classpath");
}
@@ -200,11 +196,11 @@
throw new InvocationTargetException(e);
}
- TextAnalysisEngine textAnalysisEngine;
+ AnalysisEngine textAnalysisEngine;
try
{
textAnalysisEngine = UIMAFramework
- .produceTAE(textAnalysisEngineSpecifier);
+ .produceAnalysisEngine(textAnalysisEngineSpecifier);
}
catch (ResourceInitializationException e)
{
Modified: incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/action/CorporaCollectionReader.xml
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/action/CorporaCollectionReader.xml?view=diff&rev=509708&r1=509707&r2=509708
==============================================================================
--- incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/action/CorporaCollectionReader.xml (original)
+++ incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/action/CorporaCollectionReader.xml Tue Feb 20 11:01:12 2007
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<collectionReaderDescription xmlns="http://uima.watson.ibm.com/resourceSpecifier">
<frameworkImplementation>com.ibm.uima.java</frameworkImplementation>
- <implementationName>net.sf.tae.uima.CorporaCollectionReader</implementationName>
+ <implementationName>org.apache.uima.caseditor.uima.CorporaCollectionReader</implementationName>
<processingResourceMetaData>
<name>Corpora Collection Reader</name>
<description></description>
<version>1.0</version>
- <vendor>Calcucare GmbH</vendor>
+ <vendor>The Apache Software Foundation</vendor>
</processingResourceMetaData>
</collectionReaderDescription>
Modified: incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/action/DummyTAE.xml
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/action/DummyTAE.xml?view=diff&rev=509708&r1=509707&r2=509708
==============================================================================
--- incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/action/DummyTAE.xml (original)
+++ incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/action/DummyTAE.xml Tue Feb 20 11:01:12 2007
@@ -2,12 +2,12 @@
<taeDescription xmlns="http://uima.watson.ibm.com/resourceSpecifier">
<frameworkImplementation>com.ibm.uima.java</frameworkImplementation>
<primitive>true</primitive>
- <annotatorImplementationName>net.sf.tae.uima.DummyAnnotator</annotatorImplementationName>
+ <annotatorImplementationName>org.apache.uima.caseditor.uima.DummyAnnotator</annotatorImplementationName>
<analysisEngineMetaData>
<name>DummyAnnotator</name>
<description></description>
<version>1.0</version>
- <vendor>sourceforge.net/projects/tae</vendor>
+ <vendor>The Apache Software Foundation</vendor>
<capabilities>
<capability>
<inputs/>
Modified: incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/action/Index.xml
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/action/Index.xml?view=diff&rev=509708&r1=509707&r2=509708
==============================================================================
--- incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/action/Index.xml (original)
+++ incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/action/Index.xml Tue Feb 20 11:01:12 2007
@@ -1,4 +1,22 @@
<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ 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.
+-->
<fsIndexDescription>
<label>TOPIndex</label>
<typeName>uima.cas.TOP</typeName>
Modified: incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/action/RunnableAction.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/action/RunnableAction.java?view=diff&rev=509708&r1=509707&r2=509708
==============================================================================
--- incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/action/RunnableAction.java (original)
+++ incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/action/RunnableAction.java Tue Feb 20 11:01:12 2007
@@ -21,9 +21,8 @@
import java.lang.reflect.InvocationTargetException;
-
import org.apache.uima.UIMAException;
-import org.apache.uima.caseditor.core.TaeCorePlugin;
+import org.apache.uima.caseditor.CasEditorPlugin;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.action.Action;
@@ -36,9 +35,6 @@
/**
* TODO: add javadoc here
- *
- * @author <a href="mailto:kottmann@gmail.com">Joern Kottmann</a>
- * @version $Revision: 1.2.2.1 $, $Date: 2007/01/04 14:37:53 $
*/
public class RunnableAction extends Action
{
@@ -88,13 +84,13 @@
Object[] argument = uimaException.getArguments();
- status = new Status(IStatus.ERROR, TaeCorePlugin.ID, 0,
+ status = new Status(IStatus.ERROR, CasEditorPlugin.ID, 0,
argument.length > 0 ? argument[0].toString() :
"Unkown error, see log.", cause);
}
else
{
- status = new Status(IStatus.ERROR, TaeCorePlugin.ID, 0,
+ status = new Status(IStatus.ERROR, CasEditorPlugin.ID, 0,
cause.getMessage() != null ? cause.getMessage() :
"Unkown error, see log.", cause);
}
Modified: incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/action/package.html
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/action/package.html?view=diff&rev=509708&r1=509707&r2=509708
==============================================================================
--- incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/action/package.html (original)
+++ incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/action/package.html Tue Feb 20 11:01:12 2007
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
<head>
- <title>net.sf.tae.corpusview</title>
+ <title>org.apache.uima.caseditor.corpusview</title>
</head>
<body>
Modified: incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/AnnotatorActionGroup.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/AnnotatorActionGroup.java?view=diff&rev=509708&r1=509707&r2=509708
==============================================================================
--- incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/AnnotatorActionGroup.java (original)
+++ incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/AnnotatorActionGroup.java Tue Feb 20 11:01:12 2007
@@ -23,7 +23,6 @@
import java.util.Iterator;
import java.util.LinkedList;
-
import org.apache.uima.caseditor.core.model.AnnotatorElement;
import org.apache.uima.caseditor.core.model.CorpusElement;
import org.apache.uima.caseditor.core.model.DocumentElement;
@@ -41,9 +40,6 @@
/**
* This is an action group for annotator actions.
- *
- * @author <a href="mailto:kottmann@gmail.com">Joern Kottmann</a>
- * @version $Revision: 1.2.2.1 $, $Date: 2007/01/04 14:37:51 $
*/
final class AnnotatorActionGroup extends ActionGroup
{
Modified: incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/ConsumerCorpusActionGroup.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/ConsumerCorpusActionGroup.java?view=diff&rev=509708&r1=509707&r2=509708
==============================================================================
--- incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/ConsumerCorpusActionGroup.java (original)
+++ incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/ConsumerCorpusActionGroup.java Tue Feb 20 11:01:12 2007
@@ -23,7 +23,6 @@
import java.util.Iterator;
import java.util.LinkedList;
-
import org.apache.uima.caseditor.core.model.ConsumerElement;
import org.apache.uima.caseditor.core.model.CorpusElement;
import org.apache.uima.caseditor.core.model.NlpProject;
@@ -39,9 +38,6 @@
/**
* This is an action group for cas consumer actions.
- *
- * @author <a href="mailto:kottmann@gmail.com">Joern Kottmann</a>
- * @version $Revision: 1.2.2.1 $, $Date: 2007/01/04 14:37:51 $
*/
final class ConsumerCorpusActionGroup extends ActionGroup
{
Modified: incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/CorpusExplorerActionGroup.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/CorpusExplorerActionGroup.java?view=diff&rev=509708&r1=509707&r2=509708
==============================================================================
--- incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/CorpusExplorerActionGroup.java (original)
+++ incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/CorpusExplorerActionGroup.java Tue Feb 20 11:01:12 2007
@@ -42,9 +42,6 @@
/**
* Main corpus explorer action group.
- *
- * @author <a href="mailto:kottmann@gmail.com">Joern Kottmann</a>
- * @version $Revision: 1.2.2.1 $, $Date: 2007/01/04 14:37:51 $
*/
final class CorpusExplorerActionGroup extends ActionGroup implements
ICorpusExplorerActionGroup
Modified: incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/CorpusExplorerContentProvider.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/CorpusExplorerContentProvider.java?view=diff&rev=509708&r1=509707&r2=509708
==============================================================================
--- incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/CorpusExplorerContentProvider.java (original)
+++ incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/CorpusExplorerContentProvider.java Tue Feb 20 11:01:12 2007
@@ -20,7 +20,7 @@
package org.apache.uima.caseditor.ui.corpusview;
-import org.apache.uima.caseditor.core.TaeCorePlugin;
+import org.apache.uima.caseditor.CasEditorPlugin;
import org.apache.uima.caseditor.core.model.INlpElement;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
@@ -31,9 +31,6 @@
/**
* TODO: add javadoc here
- *
- * @author <a href="mailto:kottmann@gmail.com">Joern Kottmann</a>
- * @version $Revision: 1.4.2.1 $, $Date: 2007/01/04 14:37:51 $
*/
public class CorpusExplorerContentProvider implements
ITreeContentProvider
@@ -81,7 +78,7 @@
try
{
- result = TaeCorePlugin.getNlpModel().getParent(resource);
+ result = CasEditorPlugin.getNlpModel().getParent(resource);
}
catch (CoreException e)
{
Modified: incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/CorpusExplorerUtil.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/CorpusExplorerUtil.java?view=diff&rev=509708&r1=509707&r2=509708
==============================================================================
--- incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/CorpusExplorerUtil.java (original)
+++ incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/CorpusExplorerUtil.java Tue Feb 20 11:01:12 2007
@@ -22,19 +22,11 @@
import java.util.Iterator;
import java.util.LinkedList;
-
import org.apache.uima.caseditor.core.model.INlpElement;
import org.apache.uima.caseditor.core.model.NlpProject;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
-
-/**
- * TODO: add javadoc here.
- *
- * @author <a href="mailto:kottmann@gmail.com">Joern Kottmann</a>
- * @version $Revision: 1.1.2.1 $, $Date: 2007/01/04 14:37:51 $
- */
final class CorpusExplorerUtil
{
/**
Modified: incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/CorpusExplorerView.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/CorpusExplorerView.java?view=diff&rev=509708&r1=509707&r2=509708
==============================================================================
--- incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/CorpusExplorerView.java (original)
+++ incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/CorpusExplorerView.java Tue Feb 20 11:01:12 2007
@@ -19,9 +19,7 @@
package org.apache.uima.caseditor.ui.corpusview;
-
-
-import org.apache.uima.caseditor.core.TaeCorePlugin;
+import org.apache.uima.caseditor.CasEditorPlugin;
import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.MenuManager;
@@ -52,9 +50,6 @@
/**
* The corpus explorer is a view which knows how to display and handle the nlp
* model elements.
- *
- * @author <a href="mailto:kottmann@gmail.com">Joern Kottmann</a>
- * @version $Revision: 1.4.2.2 $, $Date: 2007/01/04 14:37:51 $
*/
public final class CorpusExplorerView extends ViewPart
{
@@ -62,7 +57,7 @@
/**
* The ID of the <code>CorpusExplorerView</code>.
*/
- public final static String ID = "net.sf.tae.corpusview";
+ public final static String ID = "org.apache.uima.caseditor.corpusview";
private TreeViewer mTreeViewer;
@@ -90,12 +85,12 @@
initContextMenu();
- mTreeViewer.setInput(TaeCorePlugin.getNlpModel());
+ mTreeViewer.setInput(CasEditorPlugin.getNlpModel());
mModelChangeListener = new ModelChangeListener(
mTreeViewer);
- TaeCorePlugin.getNlpModel().addNlpModelChangeListener(mModelChangeListener);
+ CasEditorPlugin.getNlpModel().addNlpModelChangeListener(mModelChangeListener);
mTreeViewer.setSorter(new CorpusSorter());
Modified: incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/CorpusSorter.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/CorpusSorter.java?view=diff&rev=509708&r1=509707&r2=509708
==============================================================================
--- incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/CorpusSorter.java (original)
+++ incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/CorpusSorter.java Tue Feb 20 11:01:12 2007
@@ -28,9 +28,6 @@
/**
* This is a sorter for the corpus explorer tree.
- *
- * @author <a href="mailto:kottmann@gmail.com">Joern Kottmann</a>
- * @version $Revision: 1.2.2.1 $, $Date: 2007/01/04 14:37:51 $
*/
final class CorpusSorter extends ViewerSorter
{
Modified: incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/ICorpusExplorerActionGroup.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/ICorpusExplorerActionGroup.java?view=diff&rev=509708&r1=509707&r2=509708
==============================================================================
--- incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/ICorpusExplorerActionGroup.java (original)
+++ incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/ICorpusExplorerActionGroup.java Tue Feb 20 11:01:12 2007
@@ -24,9 +24,6 @@
/**
* This interface should be implemented by all action groups used
* be the corpus explorer.
- *
- * @author <a href="mailto:kottmann@gmail.com">Joern Kottmann</a>
- * @version $Revision: 1.1.2.1 $, $Date: 2007/01/04 14:37:51 $
*/
public interface ICorpusExplorerActionGroup
{
Modified: incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/ModelChangeListener.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/ModelChangeListener.java?view=diff&rev=509708&r1=509707&r2=509708
==============================================================================
--- incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/ModelChangeListener.java (original)
+++ incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/ModelChangeListener.java Tue Feb 20 11:01:12 2007
@@ -21,7 +21,6 @@
import java.util.LinkedList;
-
import org.apache.uima.caseditor.core.model.INlpElement;
import org.apache.uima.caseditor.core.model.delta.INlpElementDelta;
import org.apache.uima.caseditor.core.model.delta.INlpModelChangeListener;
@@ -34,9 +33,6 @@
/**
* The ModelChangeListener listens for changes on the nlp
* model and updates the workspace tree.
- *
- * @author <a href="mailto:kottmann@gmail.com">Joern Kottmann</a>
- * @version $Revision: 1.4.2.1 $, $Date: 2007/01/04 14:37:51 $
*/
class ModelChangeListener implements
INlpModelChangeListener
Modified: incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/OpenActionGroup.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/OpenActionGroup.java?view=diff&rev=509708&r1=509707&r2=509708
==============================================================================
--- incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/OpenActionGroup.java (original)
+++ incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/OpenActionGroup.java Tue Feb 20 11:01:12 2007
@@ -32,9 +32,6 @@
* The OpenActionGroup contains the Open Action and the Open With Menu. This
* class is resonsible to add the action and the menu to the context menu
* depending on the current selection.
- *
- * @author <a href="mailto:kottmann@gmail.com">Joern Kottmann</a>
- * @version $Revision: 1.2.2.1 $, $Date: 2007/01/04 14:37:51 $
*/
final class OpenActionGroup extends ActionGroup implements
ICorpusExplorerActionGroup
Modified: incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/RefactorGroup.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/RefactorGroup.java?view=diff&rev=509708&r1=509707&r2=509708
==============================================================================
--- incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/RefactorGroup.java (original)
+++ incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/RefactorGroup.java Tue Feb 20 11:01:12 2007
@@ -36,9 +36,6 @@
/**
* This group contains refactoring actions.
- *
- * @author <a href="mailto:kottmann@gmail.com">Joern Kottmann</a>
- * @version $Revision: 1.1.2.2 $, $Date: 2007/01/04 14:37:51 $
*/
final class RefactorGroup extends ActionGroup
{
Modified: incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/WorkspaceActionGroup.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/WorkspaceActionGroup.java?view=diff&rev=509708&r1=509707&r2=509708
==============================================================================
--- incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/WorkspaceActionGroup.java (original)
+++ incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/WorkspaceActionGroup.java Tue Feb 20 11:01:12 2007
@@ -21,9 +21,8 @@
import java.util.Iterator;
-
-import org.apache.uima.caseditor.ui.Images;
-import org.apache.uima.caseditor.ui.TaeUiPlugin;
+import org.apache.uima.caseditor.CasEditorPlugin;
+import org.apache.uima.caseditor.Images;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.jface.action.IAction;
@@ -41,9 +40,6 @@
/**
* This group contains workspace actions.
- *
- * @author <a href="mailto:kottmann@gmail.com">Joern Kottmann</a>
- * @version $Revision: 1.1.2.1 $, $Date: 2007/01/04 14:37:51 $
*/
final class WorkspaceActionGroup extends ActionGroup
{
@@ -102,11 +98,11 @@
mRetargetRefreshAction = ActionFactory.REFRESH.create(window);
mRetargetRefreshAction.setImageDescriptor(
- TaeUiPlugin.getTaeImageDescriptor(
+ CasEditorPlugin.getTaeImageDescriptor(
Images.EXPLORER_E_REFRESH));
mRetargetRefreshAction.setDisabledImageDescriptor(
- TaeUiPlugin.getTaeImageDescriptor(
+ CasEditorPlugin.getTaeImageDescriptor(
Images.EXPLORER_D_REFRESH));
}
Modified: incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/package.html
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/package.html?view=diff&rev=509708&r1=509707&r2=509708
==============================================================================
--- incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/package.html (original)
+++ incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/corpusview/package.html Tue Feb 20 11:01:12 2007
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
<head>
- <title>net.sf.tae.corpusview</title>
+ <title>org.apache.uima.caseditor.corpusview</title>
</head>
<body>
Modified: incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/model/AbstractElementAdapter.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/model/AbstractElementAdapter.java?view=diff&rev=509708&r1=509707&r2=509708
==============================================================================
--- incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/model/AbstractElementAdapter.java (original)
+++ incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/model/AbstractElementAdapter.java Tue Feb 20 11:01:12 2007
@@ -26,9 +26,6 @@
/**
* The abstract base class for all NLPElement based
* <code>IWorkbenchAdapter</code>s.
- *
- * @author <a href="mailto:kottmann@gmail.com">Joern Kottmann</a>
- * @version $Revision: 1.1.2.1 $, $Date: 2007/01/04 14:37:52 $
*/
abstract class AbstractElementAdapter implements IWorkbenchAdapter
{
Modified: incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/model/CorpusAdapter.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/model/CorpusAdapter.java?view=diff&rev=509708&r1=509707&r2=509708
==============================================================================
--- incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/model/CorpusAdapter.java (original)
+++ incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/model/CorpusAdapter.java Tue Feb 20 11:01:12 2007
@@ -1,58 +1,56 @@
-/*
- * 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.uima.caseditor.ui.model;
-
-
-import org.apache.uima.caseditor.core.model.CorpusElement;
-import org.apache.uima.caseditor.core.model.DocumentElement;
-import org.apache.uima.caseditor.ui.Images;
-import org.apache.uima.caseditor.ui.TaeUiPlugin;
-import org.eclipse.jface.resource.ImageDescriptor;
-
-/**
- * This is the IWorkbenchAdapter for the CorpusElement.
- *
- * @author <a href="mailto:kottmann@gmail.com">Joern Kottmann</a>
- */
-class CorpusAdapter extends
- AbstractElementAdapter
-{
- /**
- * Retrives all documents (children) of the current
- * CorpusElement instance.
- */
- public Object[] getChildren(Object o)
- {
- CorpusElement corpus = (CorpusElement) o;
-
- DocumentElement[] documentElements = new DocumentElement[corpus
- .getDocuments().size()];
-
- return corpus.getDocuments().toArray(documentElements);
- }
-
- /**
- * Retrives the imag {@link ImageDescriptor} for the CorpusElement.
- */
- public ImageDescriptor getImageDescriptor(Object object)
- {
- return TaeUiPlugin.getTaeImageDescriptor(Images.MODEL_CORPUS);
- }
+/*
+ * 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.uima.caseditor.ui.model;
+
+
+import org.apache.uima.caseditor.CasEditorPlugin;
+import org.apache.uima.caseditor.Images;
+import org.apache.uima.caseditor.core.model.CorpusElement;
+import org.apache.uima.caseditor.core.model.DocumentElement;
+import org.eclipse.jface.resource.ImageDescriptor;
+
+/**
+ * This is the IWorkbenchAdapter for the CorpusElement.
+ */
+class CorpusAdapter extends
+ AbstractElementAdapter
+{
+ /**
+ * Retrives all documents (children) of the current
+ * CorpusElement instance.
+ */
+ public Object[] getChildren(Object o)
+ {
+ CorpusElement corpus = (CorpusElement) o;
+
+ DocumentElement[] documentElements = new DocumentElement[corpus
+ .getDocuments().size()];
+
+ return corpus.getDocuments().toArray(documentElements);
+ }
+
+ /**
+ * Retrives the imag {@link ImageDescriptor} for the CorpusElement.
+ */
+ public ImageDescriptor getImageDescriptor(Object object)
+ {
+ return CasEditorPlugin.getTaeImageDescriptor(Images.MODEL_CORPUS);
+ }
}
Modified: incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/model/ElementWorkbenchAdapterFactory.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/model/ElementWorkbenchAdapterFactory.java?view=diff&rev=509708&r1=509707&r2=509708
==============================================================================
--- incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/model/ElementWorkbenchAdapterFactory.java (original)
+++ incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/model/ElementWorkbenchAdapterFactory.java Tue Feb 20 11:01:12 2007
@@ -1,82 +1,79 @@
-/*
- * 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.uima.caseditor.ui.model;
-
-
-import org.apache.uima.caseditor.core.model.CorpusElement;
-import org.apache.uima.caseditor.core.model.NlpModel;
-import org.apache.uima.caseditor.core.model.NlpProject;
-import org.apache.uima.caseditor.core.model.UimaConfigurationElement;
-import org.apache.uima.caseditor.core.model.UimaSourceFolder;
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-/**
- * TODO: add javadoc here
- *
- * @author <a href="mailto:kottmann@gmail.com">Joern Kottmann</a>
- * @version $Revision: 1.1.2.1 $, $Date: 2007/01/04 14:37:52 $
- */
-public class ElementWorkbenchAdapterFactory implements IAdapterFactory
-{
- private IWorkbenchAdapter mModelAdapter = new ModelAdapter();
- private IWorkbenchAdapter mProjectAdapter = new ProjectAdapter();
- private IWorkbenchAdapter mCorpusAdapter = new CorpusAdapter();
- private IWorkbenchAdapter mUimaSourceFolderAdapter =
- new UimaSourceFolderAdapter();
- private IWorkbenchAdapter mUimaConfigurationAdapter =
- new UimaConfigurationAdapter();
- private IWorkbenchAdapter mSingleElementAdapter =
- new SingleElementAdapter();
-
- public Object getAdapter(Object adaptableObject, Class adapterType)
- {
- if (adaptableObject instanceof NlpModel)
- {
- return mModelAdapter;
- }
- else if (adaptableObject instanceof NlpProject)
- {
- return mProjectAdapter;
- }
- else if (adaptableObject instanceof CorpusElement)
- {
- return mCorpusAdapter;
- }
- else if (adaptableObject instanceof UimaSourceFolder)
- {
- return mUimaSourceFolderAdapter;
- }
- else if (adaptableObject instanceof UimaConfigurationElement)
- {
- return mUimaConfigurationAdapter;
- }
- else
- {
- return mSingleElementAdapter;
- }
- }
-
- public Class[] getAdapterList()
- {
- return new Class[] {IWorkbenchAdapter.class};
-
- }
+/*
+ * 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.uima.caseditor.ui.model;
+
+
+import org.apache.uima.caseditor.core.model.CorpusElement;
+import org.apache.uima.caseditor.core.model.NlpModel;
+import org.apache.uima.caseditor.core.model.NlpProject;
+import org.apache.uima.caseditor.core.model.UimaConfigurationElement;
+import org.apache.uima.caseditor.core.model.UimaSourceFolder;
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.ui.model.IWorkbenchAdapter;
+
+/**
+ * TODO: add javadoc here
+ */
+public class ElementWorkbenchAdapterFactory implements IAdapterFactory
+{
+ private IWorkbenchAdapter mModelAdapter = new ModelAdapter();
+ private IWorkbenchAdapter mProjectAdapter = new ProjectAdapter();
+ private IWorkbenchAdapter mCorpusAdapter = new CorpusAdapter();
+ private IWorkbenchAdapter mUimaSourceFolderAdapter =
+ new UimaSourceFolderAdapter();
+ private IWorkbenchAdapter mUimaConfigurationAdapter =
+ new UimaConfigurationAdapter();
+ private IWorkbenchAdapter mSingleElementAdapter =
+ new SingleElementAdapter();
+
+ public Object getAdapter(Object adaptableObject, Class adapterType)
+ {
+ if (adaptableObject instanceof NlpModel)
+ {
+ return mModelAdapter;
+ }
+ else if (adaptableObject instanceof NlpProject)
+ {
+ return mProjectAdapter;
+ }
+ else if (adaptableObject instanceof CorpusElement)
+ {
+ return mCorpusAdapter;
+ }
+ else if (adaptableObject instanceof UimaSourceFolder)
+ {
+ return mUimaSourceFolderAdapter;
+ }
+ else if (adaptableObject instanceof UimaConfigurationElement)
+ {
+ return mUimaConfigurationAdapter;
+ }
+ else
+ {
+ return mSingleElementAdapter;
+ }
+ }
+
+ public Class[] getAdapterList()
+ {
+ return new Class[] {IWorkbenchAdapter.class};
+
+ }
}
Modified: incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/model/ModelAdapter.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/model/ModelAdapter.java?view=diff&rev=509708&r1=509707&r2=509708
==============================================================================
--- incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/model/ModelAdapter.java (original)
+++ incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/model/ModelAdapter.java Tue Feb 20 11:01:12 2007
@@ -1,70 +1,67 @@
-/*
- * 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.uima.caseditor.ui.model;
-
-import java.util.Collections;
-import java.util.LinkedList;
-
-
-import org.apache.uima.caseditor.core.model.NlpModel;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.resource.ImageDescriptor;
-
-/**
- * The <code>IWorkbenchAdapter</code> for the <code>NLPModel</code>.
- *
- * @author <a href="mailto:kottmann@gmail.com">Joern Kottmann</a>
- */
-class ModelAdapter extends
- AbstractElementAdapter
-{
- /**
- * Retrives the children of the current <code>NLPModel</code> instance.
- */
- public Object[] getChildren(Object o)
- {
- NlpModel nlpModel = (NlpModel) o;
-
- LinkedList<Object> elementList = new LinkedList<Object>();
-
- Collections.addAll(elementList, nlpModel.getNlpProjects());
-
- try
- {
- Collections.addAll(elementList, nlpModel.getNonNlpProjects());
- }
- catch (CoreException e)
- {
- e.printStackTrace();
- }
-
- return elementList.toArray();
- }
-
- /**
- * No image available.
- *
- * @return null
- */
- public ImageDescriptor getImageDescriptor(Object object)
- {
- return null;
- }
+/*
+ * 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.uima.caseditor.ui.model;
+
+import java.util.Collections;
+import java.util.LinkedList;
+
+import org.apache.uima.caseditor.core.model.NlpModel;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.resource.ImageDescriptor;
+
+/**
+ * The <code>IWorkbenchAdapter</code> for the <code>NLPModel</code>.
+ */
+class ModelAdapter extends
+ AbstractElementAdapter
+{
+ /**
+ * Retrives the children of the current <code>NLPModel</code> instance.
+ */
+ public Object[] getChildren(Object o)
+ {
+ NlpModel nlpModel = (NlpModel) o;
+
+ LinkedList<Object> elementList = new LinkedList<Object>();
+
+ Collections.addAll(elementList, nlpModel.getNlpProjects());
+
+ try
+ {
+ Collections.addAll(elementList, nlpModel.getNonNlpProjects());
+ }
+ catch (CoreException e)
+ {
+ e.printStackTrace();
+ }
+
+ return elementList.toArray();
+ }
+
+ /**
+ * No image available.
+ *
+ * @return null
+ */
+ public ImageDescriptor getImageDescriptor(Object object)
+ {
+ return null;
+ }
}
Modified: incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/model/ProjectAdapter.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/model/ProjectAdapter.java?view=diff&rev=509708&r1=509707&r2=509708
==============================================================================
--- incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/model/ProjectAdapter.java (original)
+++ incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/model/ProjectAdapter.java Tue Feb 20 11:01:12 2007
@@ -1,126 +1,123 @@
-/*
- * 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.uima.caseditor.ui.model;
-
-import java.util.Collections;
-import java.util.LinkedList;
-
-
-import org.apache.uima.caseditor.core.model.NlpProject;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.ide.IDE.SharedImages;
-
-/**
- * The <code>IWorkbenchAdapter</code> for the <code>NLPProject</code>.
- *
- * @author <a href="mailto:kottmann@gmail.com">Joern Kottmann</a>
- */
-class ProjectAdapter extends
- AbstractElementAdapter
-{
- /**
- * Retrives the children of the current <code>NLPProject</code>.
- */
- public Object[] getChildren(Object o)
- {
- Object result[];
-
- NlpProject nlpProject = (NlpProject) o;
-
- if (nlpProject.getProject().isOpen())
- {
- LinkedList<Object> childrenList = new LinkedList<Object>();
-
- childrenList.addAll(nlpProject.getCorpora());
-
- if (nlpProject.getTypesystem() != null)
- {
- childrenList.add(nlpProject.getTypesystem());
- }
-
- IResource[] resources;
- try
- {
- resources = nlpProject.getResources();
- }
- catch (CoreException e)
- {
- // TODO Auto-generated catch block
- e.printStackTrace();
- return new Object[]{};
- }
-
- if (resources != null)
- {
- Collections.addAll(childrenList, resources);
- }
-
- childrenList.addAll(nlpProject.getUimaSourceFolder());
-
- result = childrenList.toArray();
-
- }
- else
- {
- // no elements cause project is closed
- result = new Object[]
- {};
- }
-
- return result;
- }
-
- /**
- * Retrives the <code>ImageDescriptor</code> for the
- * <code>NLPProject</code>.
- *
- * @return the <code>ImageDescriptor</code>
- */
- public ImageDescriptor getImageDescriptor(Object object)
- {
- NlpProject nlpProject = (NlpProject) object;
-
- IProject project = nlpProject.getProject();
-
- IWorkbench workbench = PlatformUI.getWorkbench();
- ISharedImages sharedImages = workbench.getSharedImages();
-
- ImageDescriptor result;
-
- if (project.isOpen())
- {
- result = sharedImages
- .getImageDescriptor(SharedImages.IMG_OBJ_PROJECT);
- }
- else
- {
- result = sharedImages.getImageDescriptor(
- SharedImages.IMG_OBJ_PROJECT_CLOSED);
- }
-
- return result;
- }
+/*
+ * 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.uima.caseditor.ui.model;
+
+import java.util.Collections;
+import java.util.LinkedList;
+
+import org.apache.uima.caseditor.core.model.NlpProject;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.IDE.SharedImages;
+
+/**
+ * The <code>IWorkbenchAdapter</code> for the <code>NLPProject</code>.
+ */
+class ProjectAdapter extends
+ AbstractElementAdapter
+{
+ /**
+ * Retrives the children of the current <code>NLPProject</code>.
+ */
+ public Object[] getChildren(Object o)
+ {
+ Object result[];
+
+ NlpProject nlpProject = (NlpProject) o;
+
+ if (nlpProject.getProject().isOpen())
+ {
+ LinkedList<Object> childrenList = new LinkedList<Object>();
+
+ childrenList.addAll(nlpProject.getCorpora());
+
+ if (nlpProject.getTypesystem() != null)
+ {
+ childrenList.add(nlpProject.getTypesystem());
+ }
+
+ IResource[] resources;
+ try
+ {
+ resources = nlpProject.getResources();
+ }
+ catch (CoreException e)
+ {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ return new Object[]{};
+ }
+
+ if (resources != null)
+ {
+ Collections.addAll(childrenList, resources);
+ }
+
+ childrenList.addAll(nlpProject.getUimaSourceFolder());
+
+ result = childrenList.toArray();
+
+ }
+ else
+ {
+ // no elements cause project is closed
+ result = new Object[]
+ {};
+ }
+
+ return result;
+ }
+
+ /**
+ * Retrives the <code>ImageDescriptor</code> for the
+ * <code>NLPProject</code>.
+ *
+ * @return the <code>ImageDescriptor</code>
+ */
+ public ImageDescriptor getImageDescriptor(Object object)
+ {
+ NlpProject nlpProject = (NlpProject) object;
+
+ IProject project = nlpProject.getProject();
+
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ ISharedImages sharedImages = workbench.getSharedImages();
+
+ ImageDescriptor result;
+
+ if (project.isOpen())
+ {
+ result = sharedImages
+ .getImageDescriptor(SharedImages.IMG_OBJ_PROJECT);
+ }
+ else
+ {
+ result = sharedImages.getImageDescriptor(
+ SharedImages.IMG_OBJ_PROJECT_CLOSED);
+ }
+
+ return result;
+ }
}
Modified: incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/model/SingleElementAdapter.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/model/SingleElementAdapter.java?view=diff&rev=509708&r1=509707&r2=509708
==============================================================================
--- incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/model/SingleElementAdapter.java (original)
+++ incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/model/SingleElementAdapter.java Tue Feb 20 11:01:12 2007
@@ -1,53 +1,50 @@
-/*
- * 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.uima.caseditor.ui.model;
-
-
-import org.apache.uima.caseditor.ui.Images;
-import org.apache.uima.caseditor.ui.TaeUiPlugin;
-import org.eclipse.jface.resource.ImageDescriptor;
-
-/**
- * The <code>IWorkbenchAdapter</code> for the <code>AnnotatorElement</code>.
- *
- * @author <a href="mailto:kottmann@gmail.com">Joern Kottmann</a>
- * @version $Revision: 1.1.2.1 $, $Date: 2007/01/04 14:37:52 $
- */
-class SingleElementAdapter extends
- AbstractElementAdapter
-{
- /**
- * A <code>DocumentElement</code> has no children, just an emtpy array
- * will be retrived.
- */
- public Object[] getChildren(Object o)
- {
- return new Object[]
- {};
- }
-
- /**
- * Retrives the document element <code>ImageDescriptor</code>.
- */
- public ImageDescriptor getImageDescriptor(Object object)
- {
- return TaeUiPlugin.getTaeImageDescriptor(Images.MODEL_DOCUMENT);
- }
+/*
+ * 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.uima.caseditor.ui.model;
+
+
+import org.apache.uima.caseditor.CasEditorPlugin;
+import org.apache.uima.caseditor.Images;
+import org.eclipse.jface.resource.ImageDescriptor;
+
+/**
+ * The <code>IWorkbenchAdapter</code> for the <code>AnnotatorElement</code>.
+ */
+class SingleElementAdapter extends
+ AbstractElementAdapter
+{
+ /**
+ * A <code>DocumentElement</code> has no children, just an emtpy array
+ * will be retrived.
+ */
+ public Object[] getChildren(Object o)
+ {
+ return new Object[]
+ {};
+ }
+
+ /**
+ * Retrives the document element <code>ImageDescriptor</code>.
+ */
+ public ImageDescriptor getImageDescriptor(Object object)
+ {
+ return CasEditorPlugin.getTaeImageDescriptor(Images.MODEL_DOCUMENT);
+ }
}
Modified: incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/model/UimaConfigurationAdapter.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/model/UimaConfigurationAdapter.java?view=diff&rev=509708&r1=509707&r2=509708
==============================================================================
--- incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/model/UimaConfigurationAdapter.java (original)
+++ incubator/uima/sandbox/trunk/CasEditor/src/main/java/org/apache/uima/caseditor/ui/model/UimaConfigurationAdapter.java Tue Feb 20 11:01:12 2007
@@ -1,77 +1,74 @@
-/*
- * 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.uima.caseditor.ui.model;
-
-import java.util.Collection;
-import java.util.LinkedList;
-
-
-import org.apache.uima.caseditor.core.model.UimaConfigurationElement;
-import org.apache.uima.caseditor.ui.Images;
-import org.apache.uima.caseditor.ui.TaeUiPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.resource.ImageDescriptor;
-
-/**
- * The <code>IWorkbenchAdapter</code> for the
- * <code>UIMAConfigurationElement</code>.
- *
- * @author <a href="mailto:kottmann@gmail.com">Joern Kottmann</a>
- */
-class UimaConfigurationAdapter extends
- AbstractElementAdapter
-{
-
- /**
- * Retrives the childreens of <code>UIMAConfigurationElement</code>.
- */
- public Object[] getChildren(Object o)
- {
- UimaConfigurationElement element = (UimaConfigurationElement) o;
-
- Collection<Object> childs = new LinkedList<Object>();
-
- childs.addAll(element.getAnnotators());
-
- childs.addAll(element.getConsumers());
-
- try
- {
- childs.addAll(element.getNonNlpResources());
- }
- catch (CoreException e)
- {
- // TODO: handle it
- e.printStackTrace();
- }
-
- return childs.toArray();
- }
-
- /**
- * Retrives the <code>ImageDescriptor</code> for the
- * <code>UIMAConfigurationElement</code>.
- */
- public ImageDescriptor getImageDescriptor(Object object)
- {
- return TaeUiPlugin.getTaeImageDescriptor(
- Images.MODEL_CONFIG_FOLDER);
- }
+/*
+ * 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.uima.caseditor.ui.model;
+
+import java.util.Collection;
+import java.util.LinkedList;
+
+import org.apache.uima.caseditor.CasEditorPlugin;
+import org.apache.uima.caseditor.Images;
+import org.apache.uima.caseditor.core.model.UimaConfigurationElement;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.resource.ImageDescriptor;
+
+/**
+ * The <code>IWorkbenchAdapter</code> for the
+ * <code>UIMAConfigurationElement</code>.
+ */
+class UimaConfigurationAdapter extends
+ AbstractElementAdapter
+{
+
+ /**
+ * Retrives the childreens of <code>UIMAConfigurationElement</code>.
+ */
+ public Object[] getChildren(Object o)
+ {
+ UimaConfigurationElement element = (UimaConfigurationElement) o;
+
+ Collection<Object> childs = new LinkedList<Object>();
+
+ childs.addAll(element.getAnnotators());
+
+ childs.addAll(element.getConsumers());
+
+ try
+ {
+ childs.addAll(element.getNonNlpResources());
+ }
+ catch (CoreException e)
+ {
+ // TODO: handle it
+ e.printStackTrace();
+ }
+
+ return childs.toArray();
+ }
+
+ /**
+ * Retrives the <code>ImageDescriptor</code> for the
+ * <code>UIMAConfigurationElement</code>.
+ */
+ public ImageDescriptor getImageDescriptor(Object object)
+ {
+ return CasEditorPlugin.getTaeImageDescriptor(
+ Images.MODEL_CONFIG_FOLDER);
+ }
}